Description Usage Arguments Value Author(s) See Also Examples
Transform a data with binomial responses into a data with binary response.
1 | binarize_binom(dat, responses, variable.name = NULL)
|
dat |
A data whose features are categorical, and has two integer columns that correspond to binomial responses |
responses |
A character vector of length 2 where each element is the names of columns that store the counts of positive and negative responses, in this order |
variable.name |
NULL by default; a character that will be used for the name of new binary response column after binarization; if NULL, then a randomly generated character will be used |
A data.table that has the same categorical features as dat
,
and has variable.name
column as its binary response
Junkyu Park
binarize_pois
,
change_form
,
Binarizing data using data.table
1 2 3 | # data(rich_binom)
binarize_binom(rich_binom, c('rich', 'not_rich'))
binarize_binom(rich_binom, c('rich', 'not_rich'), 'is_rich')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.