formatClasses(magpie)R Documentation

formatClasses: Format your class labels data file to be compatible with the class dataset

Description

This function creates new data files from existing text file of class labels to comply to the format required by the class dataset.

Arguments

classDataFile character.URL of the output file containing the classes
outClassDataFile character. URL of the output file (new file) containing the classes
sampleNames logical. TRUE if the names of the samples are provided in classDataFile
separator character. The field separator string. Values within each row of classDataFile are separated by this string. (default "" corresponds to any blank character " " "\t"...)
vertical logical. TRUE if the classes are along a column, FALSE if they are on a row.

Value

NULL
Write a new file containing the classes label.

Using this function

formatClasses(classDataFile, outClassDataFile, sampleNames=FALSE, separator="", vertical=FALSE)

Create a new file outClassDataFile containing the label of the class of each sample from the data file classDataFile. If the sample names are not provided (sampleNames = FALSE) they are automatically generated as X1, X2 ... Xn. The separator is the sequence of character that separates two class labels. vertical indicates if the class label are in columns (vertical=TRUE) or lines.

Author(s)

Camille Maumet

See Also

dataset, formatGenesExpr

Examples

## Not run: 
classesDataFile <- "pathToFile/colClasses.txt"
outClassDataFile <- "pathToFile/colClasses_formated.txt"

formatClasses(classDataFile, outClassDataFile, sampleNames=FALSE, vertical=TRUE)
## End(Not run)

[Package magpie version 0.1 Index]