extract_code | R Documentation |
This uses a regular expression to get a code from beging of a character string. Useful to extract names from code-name variables.
extract_code(x, numbers_as_numeric = TRUE)
x |
A character vector (or a factor). |
numbers_as_numeric |
A locigal. Whether to try to convert a code to a numeric. |
A character vector (or a factor).
extract_name
extract_code("508 Mantta-Vilppula")
extract_code("508 Mantta-Vilppula", numbers_as_numeric = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.