Description Usage Arguments Details Examples
This function discretizes a column of numerical values and returns the values in a new column.
1 |
DT |
The data.table for cut() to be used in. |
NewColumn |
The name for the new column. |
x |
Argument for cut(), a numeric vector which is to be converted to a factor by cutting. |
breaks |
Argument for cut(), either a numeric vector of two or more unique cut points or a single number (greater than or equal to 2) giving the number of intervals into which x is to be cut. |
include.lowest |
Argument for cut(), logical, indicating if an ‘x[i]’ equal to the lowest (or highest, for right = FALSE) ‘breaks’ value should be included. |
... |
Other argument for cut(). |
It is similar to base::cut() but it also arranges the new column to be right next to the old column being discretized.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.