cut | R Documentation |
cut(x, at, label = NULL, ...)
x |
A numeric vector to be cut into factors. |
at |
A numeric vector specifying the breakpoints or categories
for cutting the vector. If a single value is provided,
the function will create breaks using the same method as |
label |
Optional labels for the resulting factor levels. If not provided, labels will be automatically generated based on the breaks. |
... |
Additional arguments to be passed to |
This function cuts a numeric vector into factors
based on specified breaks or categories.
If the input vector is not numeric, the function delegates
to the base R cut
function.
A factor representing the cut vector with factor levels assigned based on the breaks or categories.
Other Data Management:
append()
,
codebook()
,
count_functions
,
tag_duplicates()
x <- c(1, 2, 3, 4, 5)
cut(x, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.