eq_clean_data: Clean data from NOAA

Description Usage Arguments Details Value Examples

Description

clean function for data from NOAA

Usage

1

Arguments

data

data frame from NOAA, Default: NULL

r.na

if TRUE, keeps all columns where MONTH AND DAY are NA. Otherwise, filter them, Default: TRUE

Details

This function is only useful for data from NOAA or another data with similar information.

Value

a data frame with the following: A date column created by uniting the year, month, day and converting it to the Date class. LATITUDE and LONGITUDE columns converted to numeric class. Any other column in the original data frame, except MONTH, YEAR, DAY, HOUR, MINUTE and SECOND

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
if(interactive()){
 clean_data_1 <- eq_clean_data(data = Earthquakes)
 head(clean_data_1)
 }
 if(interactive()){
 clean_data_2 <- eq_clean_data(data = Earthquakes,
 r.na = FALSE)
 head(clean_data_2)
 }

## End(Not run)

Juanin2691/toolsEarthquakes documentation built on May 28, 2019, 5:41 p.m.