Description Usage Arguments Value Examples
View source: R/create_label_from_metadata.r
This function creates a label object from metadata
1 2 | create.label.from.metadata(meta, column, case,
control=NULL, p.lab = NULL, n.lab = NULL, verbose=1)
|
meta |
metadata as read by read.meta of sample_data-class |
column |
name of column that will be used to create the label |
case |
name of a label that will be used as a positive label. If the variable is binary, the other label will be used as a negative one. If the variable has multiple values, all the other values will be used a negative label (testing one vs rest). |
control |
name of a label or vector with names that will be used as a negative label. All values that are nor equal to case and control will be dropped. Default to NULL in which case: If the variable is binary, the value not equal to case will be used as negative. If the variable has multiple values, all the values not equal to cases will be used a negative label (testing one vs rest). |
p.lab |
name of the positive label (useful mostly for visualizations). Default to NULL in which case the value of the positive label will be used. |
n.lab |
name of the negative label (useful mostly for visualizations). Default to NULL in which case the value of the negative label will be used for binary variables and "rest" will be used for variables with multiple values. |
verbose |
control output: |
an object of class label-class
1 2 3 | data(siamcat_example)
label <- create.label.from.metadata(meta(siamcat_example),"fobt",
case = 1, control = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.