Description Usage Arguments Value Examples
Determines if column(s) in the vector or data.frame is/are categorical.
1 | is.categorical(data, varname = NULL, lower = 1, upper = 11)
|
data |
is a data.frame or vector representing the data to be analyzed. |
varname |
is the name of a column of the data.frame to be determined if it is a categorical variable or not based on the number of factors. It can be evaluated singularly (if a string) or if it is a vector of strings an equal length vector will be returned. If data is a vector then this argument can be optional, if it is optional and a data.frame is provided for the input data then all columns will be evaluated. |
lower |
is a numeric to set the lower bound, number of unique entries is GREATER THAN this value. Default is 1 (at least 2+ uniques). |
upper |
is a numeric to set the upper bound, number of unique entries is LESS THAN this value. Default is 11 (less than 11 uniques). |
a vector indicating if the data vector or data.frame column(s) are likely categorical variables by the presence of more than 2 but less than 10 unique counts.
1 2 3 4 | ## Not run:
is.categorical()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.