addVariables: Add Variable Annotation

Description Usage Arguments Value Author(s) Examples

View source: R/facopy_internal_v45.r

Description

Attaches phenotypic information to a facopyInfo object that had been created from copy number data.

Usage

1
2
3
4
addVariables(fad, varInfo, varTypes, 
             varColumns = NULL, varValues = NULL,
             varColumnsNames = NULL, varValuesNames = NULL,
             ...)

Arguments

fad

facopyInfo object with a certain study's facopy data.

varInfo

A character or a data.frame. If it is a character, it should indicate the name of the file with information on the variables. If it is a codedata.frame, a column named code should contain the samples' unique identifiers.

varTypes

A vector of characters with the same length as the number of variables whose information will be loaded. Variables can be either categorical or quantitative. Planning ahead for subsequent analyses, it might be best to regard ordered variables as categorical. Vector elements should equal either "categorical" or "quantitative".

varColumns

An optional character vector. If the table with variable information contains extra columns, this parameter allows the specification of those columns with information on the variables to use.

varValues

An optional list of vectors. Each vector is either null or contains the subset of values to be used in subsequent analyses for the corresponding variable.

varColumnsNames

An optional character vector with the names of the variables, if different from the corresponding column names in the table.

varValuesNames

An optional list of vectors with the names of the variable values, if different from the corresponding values in the columns. If a vector is null, the corresponding value names are not changed, which is useful for quantitative variables with many possible values.

...

Extra parameters passed to the function are in turn passed to read.table, such as the presence of header and the column separation character. Only used if varInfo is a character that indicates the name of the file with variable information.

Value

facopyInfo object with incorporated phenotypic information.

Author(s)

David Mosen-Ansorena

Examples

1
2
3
4
data(myCalls)
data(myVariables)

myStudy = addVariables(myCalls, myVariables, c("continuous","categorical")) 

facopy documentation built on May 2, 2018, 2:30 a.m.