Description Usage Arguments Value Examples
View source: R/incoming_data.R
The rnoaa package returns dates in the station list in "mm/dd/yyyy"
format, and we (Wang & Dillon) formatted our dates in a similar way. All date
and spectral calculations work on multi-year Julian dates. This is a small
helper function to convert from "mm/dd/yyyy" to julian day. Because it uses
mdy.date()
from the date package, it returns the number of days
since January 1, 1960. Inputs are coerced to character if necessary.
1 | mmddyyyy_to_numeric(mmddyyyy_dates = stop("Char dates mm/dd/yyyy rqrd."))
|
mmddyyyy_dates |
a vector of dates in "mm/dd/yyyy" format. |
a numeric vector of the number of days since 1/1/1960, dates before this are negative.
1 | mmddyyyy_to_numeric(c("3/5/1954", "9/28/2012"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.