read.label | R Documentation |
Read label information from a file
read.label(fn.in.label)
fn.in.label |
name of the tsv file containing labels |
This function reads in a tsv file with labels and converts it into a label.
First row is expected to be
#BINARY:1=[label for cases];
-1=[label for controls]
.
Second row should contain the sample identifiers as tab-separated list (consistent with feature and metadata).
Third row is expected to contain the actual class labels (tab-separated):
1
for each case and -1
for each control.
Note: Labels can take other numeric values (but not characters or strings); importantly, the label for cases has to be greater than the one for controls
label object containing several entries:
$label
named vector containing the numerical labels from the
file;
$info
information about the classes in the label;
$type
information about the label type (e.g. BINARY
);
# run with example data
fn.label <- system.file('extdata',
'label_crc_zeller_msb_mocat_specI.tsv',
package = 'SIAMCAT')
crc.zeller.label <- read.label(fn.label)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.