convert_yrmon: Convert month-day timestamps in various formats to other...

Description Usage Arguments Value

Description

Convert month-day timestamps in various formats to other formats.

Usage

1
convert_yrmon(x, from = "Y1234M12", to = "Date", day = 1)

Arguments

x

the input date indicator - see from

from

character indicating the input format

  • "Y1234M12" this is the default input format Y

  • "POSIXct" for POSIXct class

  • "matrix" an nx2 numeric matrix of [year, mon, day]

  • "Date" for Date class

  • "pretty" for character in

to

character indicating the desired output

matrix

returns an nx3 numeric matrix of year, mon, day

Date

returns a vector of Date values, see day - default

POSIXct

returns a vector of POSIXct values, see day

pretty

returns a character vector of YYYY-mm

Y1234M12

returns a yrmon stamp

year

returns the year as numeric

month

return the month as numeric

day

numeric, by default 1 but set this to the desired day when to is Date d

Value

converted yearmonth string to desired


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