eq_clean_data: eq_clean_data

Description Usage Arguments Details Value References Examples

Description

A read data file function into a cleaned version of a data frame.

Usage

1
eq_clean_data(filename)

Arguments

filename

Is a character string giving the file name of the input data file.

Details

eq_clean_data reads a filename from the U.S. National Oceanographic and Atmospheric Administration (NOAA) on signicant earthquakes around the world, into a clean version of an R data frame. It stops if the file does not exist. The cleaned version of the data frame has: i) the year, month and day converted to the Date class, after dealing with negative years (BCE) ii) EQ_PRIMARY, TOTAL_DEATHS, YEAR, LATITUDE and LONGITUDE columns converted to numeric class. iii) A clean LOCATION_NAME column by calling the eq_location_clean function.

Value

A clean version of an R data frame with the NOAA data contained in filename.

References

https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
eq_clean_data("signif.txt")

## End(Not run)

## Not run: 
eq_clean_data()

## End(Not run)

Darwinita/EarthquakingLCP documentation built on May 12, 2019, 8:40 a.m.