eq_good_date: Combine the year, month, and day columns in the NOAA...

Description Usage Arguments Details Value Examples

View source: R/cleandata.R

Description

Combine the year, month, and day columns in the NOAA earthquake data into a single date Individual year, month, and day columns make filtering the data difficult. This function combines them into a single date object. Only to be used internally to the package.

Usage

1
eq_good_date(yr, mnth, dy)

Arguments

yr

integer of the year the earthquake occurred. Negative numbers indicate BCE

mnth

integer of the month (1-12)

dy

integer of the day of the month

Details

Note that R date objects do not handle BCE dates well. For example, they assume a year 0 exists, when in fact dates go from 1 BCE to 1 CE, with no 0 in between. Therefore, date differences between BCE and CE will not be correct. However, date ranges should still be accurately reflected. Not all entries have date details beyond year, in that case the date is January 1 of the appropriate year

Value

a single date object

Examples

1
capstoneR:::eq_good_date(2017, 7, 1)

gravatarsmiley/capstoneR documentation built on May 30, 2019, 4:06 a.m.