from {meteor}R Documentation

Date manipulation

Description

Helper functions for extracting information from dates. Or to create a Date from a day number.

Usage

fromDate(x, v)
fromYear(y, v)
fromDoy(doy, y)

Arguments

x

Date or POSIX

y

integer (year)

v

character. Output variable. With fromDate it can be one of: "year", "month", "week", "day", "doy". With fromYear it can be one of "leap", "ndays", "days"

doy

integer (day of the year)

Value

integer or Date

Examples

d <- as.Date("1999-12-30") + 1:2
d
fromDate(d, "month")
fromDate(d, "doy")

fromDoy(10, 2000)

[Package meteor version 0.4-5 Index]