Description Usage Arguments Details Value Examples
eq_location_clean
formats the LOCATION_NAME variable by stripping
out the country from the name and converting the text from uppercase to
title case. For consistency, it also removes extra spaces from the text and
formats the COUNTRY variable in the same way as the LOCATION_NAME variable.
1 |
df |
A data frame cotaining the earthquake data. |
eq_location_clean
assumes the country appears in the
LOCATION_NAME variable at the beginning of the text and is separated from the
location by a colon. Given this pattern, the function uses a regular
expression to find and remove the country from the beginning of the text.
A data frame containing the earthquake data with reformatted COUNTRY and LOCATION_NAME variables. If an error or warning occurs, a message will be printed to the console and the function will return NULL.
1 2 3 4 | ## Not run:
df <- eq_location_clean(df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.