formatClasses {magpie} | R Documentation |
This function creates new data files from existing text file of class labels to comply to the format required by the class dataset.
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. |
NULL
Write a new file containing the classes label.
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.
Camille Maumet
## Not run: classesDataFile <- "pathToFile/colClasses.txt" outClassDataFile <- "pathToFile/colClasses_formated.txt" formatClasses(classDataFile, outClassDataFile, sampleNames=FALSE, vertical=TRUE) ## End(Not run)