Description Usage Arguments Value Examples
This function (eq_clean_data) removes unnecessary columns using the select_ function from the dplyr package (select_
).
The columns that are kept in the data are: YEAR, MONTH, DAY, LATITUDE, LONGITUDE, LOCATION_NAME, TOTAL_DEATHS, COUNTRY, EQ_PRIMARY.
Earthquakes with negative year values are excluded from the data using the filter_ function from the dplyr package (filter_
).
The mutate_ function from the dplyr package (mutate_
) is used to create a date column and ensure analysis columns are numeric.
1 |
data |
Name of input data frame on which to apply function. |
This function returns a data frame table containing a cleansed subset of the earthquake data.
1 2 3 4 5 | ## Not run:
eq_clean <- eq_clean_data(eq_data)
eq_clean <- eq_clean_data(data= eq_data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.