inspect_type | R Documentation |
Checks character or factor vector to determine whether it might be best to convert to numeric.
inspect_type(x, xname = NULL, verbose = TRUE, thresh = 0.5, na.omit = TRUE)
x |
Character or factor vector. |
xname |
Character: Name of input vector |
verbose |
Logical: If TRUE, print messages to console. |
thresh |
Numeric: Threshold for determining whether to convert to numeric. |
na.omit |
Logical: If TRUE, remove NA values before checking. |
E.D. Gennatas
## Not run:
x <- c("3", "5", "undefined", "21", "4", NA)
inspect_type(x)
z <- c("mango", "banana", "tangerine", NA)
inspect_type(z)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.