eq_clean_data: Clean Earthquakes NOAA dataset

Description Usage Arguments Value Examples

View source: R/process_data.R

Description

This function clean the input data by cpnverting it into a data frame, bluid a new variable representing the date of the earthquake, assure relevant variables are numeric (LATITUDE, LONGITUDE, EQ_PRIMARY, DEATHS), and finally clean the LOCATION_NAME by calling the eq_location_clean function. If any of those variables is not present, the function stops and return an error message.

Usage

1

Arguments

raw

a data frame or matrix containing the information about earthquakes. Must contain the following columns: YEAR, MONTH, DAY, LATITUDE, LONGITUDE, EQ_PRIMARY, DEATHS.

Value

a data frame with cleaned data

Examples

1
2
3
4
## Not run: 
data <- eq_clean_data(raw_data)

## End(Not run)

frenkg/coursera.eq documentation built on July 11, 2017, 12:41 a.m.