View source: R/dataWranglingCleaning.R
extract_num | R Documentation |
Extracts number (positive or negative) from a string and converts it to numerical. If two number in the same string, then it will return the numbers combined
extract_num(x)
x |
a (vector) string |
Numeric
extract_num("I am 22 years old")
extract_num(c("I am -22 years old", "-74 and 80"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.