Learn R Programming

tempoR (version 1.0.4.4)

loadCLS: Load a categorical or continuous cls formatted file.

Description

loadCLS loads a categorical or continuous cls formated file. Both file formats are described at the BROAD site.

Usage

loadCLS(target, sampleNames)

Arguments

target

a string indicating the location of the .cls file. loadCLS will automatically determine whether the specified file is categorical or continuous.

sampleNames

a list of sample names that correspond to each each entry in the .cls file.

Value

a list indexed by sample id containing the specified categorical or continuous variable.

Examples

Run this code
# NOT RUN {
# The .cls format does not include sample names, so it is necesary to have some already.
# In this case, we get them from the .gct file
sampleNames = names(loadGCT(file.path(path.package("tempoR"),"gse32472Example.gct")))

# Example continouous and categorical .cls files are included in the package
exampleAgesPath = file.path(path.package("tempoR"),"gse32472Example.age.cls")
exampleAges = loadCLS(exampleAgesPath, sampleNames)

exampleClassesPath = file.path(path.package("tempoR"),"gse32472Example.phen.cls")
exampleClasses = loadCLS(exampleClassesPath, sampleNames)
# }

Run the code above in your browser using DataLab