first_char | R Documentation |
This helper function will extract the first character from a string. The element may be a letter, number, or special character but will be coerced to a character vector in the output.
first_char(string)
string |
Character vector from which the first character will be extracted |
Character vector with the first character from each element in the vector passed to the input "string" argument. This value will be the same length as the original vector.
first_char("purple") first_char(c("purple","rain")) first_char(c("nothing","compares","2u"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.