name_cuts | R Documentation |
Create a name for cutpoint variables based on location of cut and number of groups.
name_cuts(x, cuts)
x |
vector to split by certain cutpoints |
cuts |
where to cut |
The naming system is based on how Hmisc::cut2()
cuts variables. Used in
build_cuts()
for naming the new cutpoint variables.
A character string representing the cutpoint variable name.
Derek Chiu
Hmisc::cut2()
, build_cuts()
set.seed(1108)
x <- sample(0:4, size = 1000, replace = TRUE)
name_cuts(x, c(1, 4))
name_cuts(x, c(2, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.