dichotomize.dataset {SIMMS} | R Documentation |
Dichotomize a single dataset
Description
Split a dataset into two groups by median-dichotomization
Usage
dichotomize.dataset(x, split.at = "median")
Arguments
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' |
Value
A vector of the data dichotomized onto a 0/1 (low/high) scale.
Author(s)
Syed Haider & Paul C. Boutros
Examples
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);
[Package SIMMS version 1.3.2 Index]