View source: R/dichotomize.dataset.R
dichotomize.dataset | R Documentation |
Split a dataset into two groups by median-dichotomization
dichotomize.dataset(x, split.at = "median")
x |
A vector of values to be dichotomized |
split.at |
An character string or a numeric value that is be used to dichotomize. Valid values are: 'median', 'mean', or a user defined numeric threshold. Defaults to 'median' |
A vector of the data dichotomized onto a 0/1 (low/high) scale.
Syed Haider & Paul C. Boutros
tmp <- rnorm(100); tmp.groups.median <- dichotomize.dataset(tmp); tmp.groups.mean <- dichotomize.dataset(tmp, split.at = "mean"); tmp.groups.custom <- dichotomize.dataset(tmp, split.at = 0.3);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.