create.label.from.metadata: create a label object from metadata

Description Usage Arguments Value Examples

View source: R/create_label_from_metadata.r

Description

This function creates a label object from metadata

Usage

1
2
create.label.from.metadata(meta, column, case, 
control=NULL, p.lab = NULL, n.lab = NULL, verbose=1)

Arguments

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: 0 for no output at all, 1 for only information about progress and success, 2 for normal level of information and 3 for full debug information, defaults to 1

Value

an object of class label-class

Examples

1
2
3

KonradZych/SIAMCAT documentation built on May 17, 2019, 6:20 p.m.