dates

0th

Percentile

Generate Dates and Times Components from Input

Create objects which represent dates or times.

Keywords
chron
Usage
dates(x, …)
times(x, …)
Arguments
x

a chron object, a character vector, or a numeric vector specifying time. If character, it must be in a format recognized by chron(). If numeric, it specifies Julian dates, i.e., number of days since an origin.

...

parameters for chron().

Value

An object of class dates or times, depending of the function called.

These functions return objects inheriting from dates and times, respectively. They call chron() if x does not belong to any of the chronological classes.

See Also

chron, times, seq.dates, cut.dates

Aliases
  • dates
  • times
  • Math.dates
  • Ops.dates
  • Summary.dates
  • [<-.dates
  • all.equal.dates
  • as.data.frame.dates
  • c.dates
  • floor.dates
  • format.dates
  • print.dates
  • trunc.dates
  • Math.times
  • Ops.times
  • Summary.times
  • [.times
  • [<-.times
  • [[.times
  • as.character.times
  • as.data.frame.times
  • axis.times
  • c.times
  • diff.times
  • format.times
  • format<-.times
  • hist.times
  • identify.times
  • is.na.times
  • lines.times
  • mean.times
  • plot.times
  • points.times
  • print.times
  • quantile.times
  • summary.times
Examples
# NOT RUN {
dts <- dates(c("02/27/92", "02/27/92", "01/14/92",
               "02/28/92", "02/01/92"))
dts
# [1] 02/27/92 02/27/92 01/14/92 02/28/92 02/01/92
class(dts)

x <- chron(dates = c("02/27/92", "02/27/92", "01/14/92", "02/28/92"),
           times = c("23:03:20", "22:29:56", "01:03:30", "18:21:03"))
dates(x)
# [1] 02/27/92 02/27/92 01/14/92 02/28/92
# }
Documentation reproduced from package chron, version 2.3-53, License: GPL-2

Community examples

Looks like there are no examples yet.