Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

julTOymdh

Convert Julian dates to character format.


Description

Converts Julian dates to YYYYMMDDHH or YYYYMMDD character format.

Usage

julTOymdh( julianDates, origin = NULL, dropHour = NULL)

Arguments

julianDates

A numeric vector specifying Julian dates.

origin

A named vector specifying the month, day, and year for the origin of the Julian dates. The default is c(month = 1, day = 1, year = 2000). The default is attr(julianDates, "origin") if it exists.

dropHour

A logical value indicating whether of not the hour information should be drop from the specifiation of the dates if none of the Julian dates are fractional. The default is attr(julianDates, "dropHour") if it exists.

Details

Requires the chron library.

Value

A character vector or numeric equivalent of dates in the form YYYYMMDDHH or YYYYMMDD, in which YYYY specifies the year, MM the month, DD the day, and (optionally) HH the hour corresponding to the Julian input.

See Also

Examples

data(ensBMAtest)

  julianIdates <- ymdhTOjul(ensBMAtest$idate)

  all.equal( julTOymdh(julianIdates), as.character(ensBMAtest$idate))

  all.equal( ymdhTOjul(ensBMAtest$vdate), julianIdates+2)

ensembleBMA

Probabilistic Forecasting using Ensembles and Bayesian Model Averaging

v5.1.5
GPL (>= 2)
Authors
Chris Fraley, Adrian E. Raftery, J. McLean Sloughter, Tilmann Gneiting, University of Washington.
Initial release
2018-01-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.