eq_clean_data: Tidy and subset earthquake data

Description Usage Arguments Value Examples

View source: R/Eq.r

Description

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.

Usage

1

Arguments

data

Name of input data frame on which to apply function.

Value

This function returns a data frame table containing a cleansed subset of the earthquake data.

Examples

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)

drsmd23/Eq documentation built on July 13, 2017, 12:41 a.m.