cutNumeric | R Documentation |
This function cuts a vector of numbers just like the base R function
cut
except that the output will be a vector of numbers
rather than that weird factor that's the default. The number listed in the
output will be the upper boundary of the bin for the number that was used in
the input.
cutNumeric(x, breaks)
x |
A numeric string |
breaks |
the desired breaks in that string; these are the same as for the base function "cut". The number must be <= the bin into which it is sorted and the number must be >= the next-lower bin. |
Returns a vector of numeric data
cutNumeric(c(-5, 17, 32, 65, 118), breaks = c(c(0, 15, 30, 60, 120)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.