transposedata {HDTD} | R Documentation

## Interchanging the Row and Column Variables in Transposable Data

### Description

This function interchanges the row and column variables in transposable data so that the original row variables will be treated as column variables and the original column variables as row variables.

### Usage

    transposedata(datamat, N)

### Arguments

`datamat` | numeric matrix containing the transposable data.
`N` | positive integer number indicating the sample size, i.e., the number of subjects.

### Details

It is assumed that there are `nrow(datamat)` row variables and `ncol(datamat)`/`N` column variables in `datamat`. Further, `datamat` should be written in such a way that every `ncol(datamat)`/`N` consecutive columns belong to the same subject and the order of the column variables in each block is preserved across subjects.

### Value

Returns a matrix with `ncol(datamat)` rows and `nrow(datamat)`/`N` columns.

### Author(s)

Anestis Touloumis

### See Also

`centerdata` and `orderdata`.

### Examples

    data(VEGFmouse)
    ## Transposing the VEGF dataset.
    VEGFtr <- transposedata(datamat = VEGFmouse, N = 40)

[Package HDTD version 1.24.0 Index]