transpose: Function transposes the dataframe. You tell it which columns...

Description Usage Arguments Value

View source: R/import-data.R

Description

Function transposes the dataframe. You tell it which columns contain row id information, and which contain row measurement information, so that it can put together the transposed dataset correctly. The "names" of the data frame become the row.names after the transpose. This is made into an additional column called sample_id.

Usage

1
transpose(d, id_cols, id_col_name, name_cols = NULL)

Arguments

d

Input data frame

id_cols

numeric indices of columns containing row id information

id_col_name

If we don't supply a name_cols function, what do we want to call the auto-generated id column?

name_cols

unary function that takes the sub-matrix of (formerly row, after transpose column) information, and creates a vector to be used for sample names out of it. Note that this function must also append to the front the name of the id column

Value

transposed data frame, with the sample_ids in the first colmns (used to be original data frame names), and the frame/variable id information in the names(...) attribute.


interzoneboy/MS-prep documentation built on June 13, 2020, 7:03 a.m.