convert_yrweek: Convert year-week timestamps in various formats to other...

Description Usage Arguments Value

Description

Convert year-week timestamps in various formats to other formats.

Usage

1
convert_yrweek(x, from = "Y1234W12", to = "POSIXct")

Arguments

x

the input date indicator - see from

from

character indicating the input format

  • Y1234W12 this is the default input format

  • POSIXct for POSIXct class

  • matrix an nx2 numeric matrix of [year, week]

  • Date for Date class

  • pretty for character in Y-w format

to

character indicating the desired output

matrix

returns an nx2 numeric matrix of [year, week]

Date

returns a vector of Date values, see day

POSIXct

returns a vector of POSIXct values, see day

pretty

returns a character vector of Y-w

Y1234D123

returns a yrday stamp in format YyWw

year

returns the year as numeric

week

return the week (1-46) as numeric

day

return the day number as numeric

Value

converted yearday string to desired format


btupper/obpgtools documentation built on May 13, 2019, 8:42 a.m.