View source: R/collectedfunctions.R
lhcut | R Documentation |
Cut values and create category
lhcut(
data,
var = "AGE",
breaks = c(20, 40, 60),
labels = "fancy",
right = F,
newvar = "default"
)
data |
Data frame |
var |
Variable to be cut |
breaks |
break points |
labels |
category name. If fancy, the categories will be created according to the break points |
right |
If false, right value will be exclusive @param newvar vector name of the categorical. If default, the var with suffix"cat" will be used as default name |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.