Description Usage Arguments Details Value Examples
View source: R/toBinaryResponse.R
Convert multiclass response to binary response
1 2 3 4 5 6 7 8 |
chr |
A character vector or factor |
p.responses |
Name of positive classes to convert |
p.return |
Name of positive class to return |
n.responses |
Name of negative classes to convert |
n.return |
Name of negative class to return |
as.factor |
Option to return a factor instead of character vector |
Classes here refer to the type of responses; not to be confused with R classes.
If only one class is specified for Pclasses and no name is specified for Preturn, Pclasses is returned. Preturn can be specified in case one would like to change the name of the class. This is also the same for Nclasses/Nreturn.
Returns a character vector or factor with only two classes
1 2 | responses <- c('BRCA1', 'BRCA2', 'none','BRCA1','BRCA1', 'BRCA2', 'none')
toBinaryResponse(responses)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.