binVar {DAMisc} | R Documentation |
Bins a continuous variable into a categorical variable
binVar(
x,
bins = 4,
method = c("intervals", "proportions"),
labels = FALSE,
include.lowest = TRUE,
right = FALSE,
...
)
x |
Continuous variable to be binnged |
bins |
Number of groups in new variable |
method |
Method for generating "intervals" for fixed-width intervals and "proportions" for cut-points based on quantiles of the distribution. |
labels |
An optional vector of labels to apply to the groups |
include.lowest |
Logical indicating whether a value equal to the lowest (if |
right |
Logical indicating Whether the intervals should be closed on the right and open on the left (if |
... |
Other arguments to be passed down to Function adapted from |
A factor
John Fox