categorize | R Documentation |
Assigns a category to each element of a vector for a given set of threshold values.
categorize(x, categ, lower = FALSE)
x |
a numeric, complex, character or logical vector. |
categ |
a set of threshold values used to assign categories. |
lower |
a logical. If |
A vector of categories assigned.
categorize(stats::runif(40), categ=c(0.5,0.75)) categorize(LETTERS[1:5], categ='C') categorize(LETTERS[1:5], categ='C', lower=TRUE) categorize(LETTERS[floor(5*stats::runif(20))+1], categ=LETTERS[1:5], lower=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.