Description Usage Arguments Value Examples
Detect a vector that might be of class character
1 | detect_char(x, convert = FALSE)
|
x |
a vector |
convert |
a logical value indicating whether to convert the vector into character if it is suspected by the function to be of class character. Default is FALSE |
If convert is TRUE, return converted vector of class character. Otherwise, return nothing but print corresponding messages
1 2 3 4 5 | x <- as.factor(c("This", "is", "actually", "a", "sentence"))
class(x)
detect_char(x)
xnew <- detect_char(x, convert = TRUE)
class(xnew)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.