Description Usage Arguments Examples
This function will be used to import and clean NOAA data for further
analysis. While it is possible that this will be called by the usuer, it is
more likely the case that this function will be used in future functions that
produced a more valuable output than the cleaned data itself. As is
common this function uses the tidyverse
packages. Normally the author prefers
the data.table
package for speed, however, the NOAA set is very small
and users will more likely be familiar with tidyverse
syntax. See
https://www.ngdc.noaa.gov/nndc/struts/results?&t=101650&s=225&d=225
for data defintions.NOAA data goes back in history thousands of years. For
this reason their raw data contains negative and positive years, the sign
indicating the B.C vs A.D respectively.
1 2 | eq_clean_data(dataframe, file = NULL, dayfill = 1, monthfill = 7,
delim = "\t", ...)
|
dataframe |
A |
file |
A character for the file that contains the 'dirty' data. This requires the full path if not in the working director. If a vector is given multiple data sets will be produced. |
dayfill |
A number indicating day of the month to use for missing data. The missing data is common for old earthquakes for which data is not possible. The default is to pick the first of the month. |
monthfill |
A number indicating the month to use for missing data. The missing data is common for old earthquakes for which data is not possible. The default is to pick July; middle of the year. |
delim |
A character string, dictating how the dirty data file is
delimited. This control is passed directly into the |
... |
This can be used primarily to pass arguments to the support functions imported from other packages: |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
#for a file from NOAA, simply point machine to file and the data.frame will return
eq_clean_data(file="datafromnoaa.txt")
#if you have imported the data and just want it cleaned per the standard of this package
data<-read.delim("file.csv")
eq_clean_data(dataframe=data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.