Learn R Programming

timeseriesdb (version 1.0.0-1.1.2)

index_to_date: Helper Function for Date Operations

Description

This function is not exported. Helper function to convert time series indices of the form 2005.75 to a date representation like 2005-07-01. Does not currently support sub-monthly frequencies.

Usage

index_to_date(x, as.string = FALSE)

Arguments

x

numeric A vector of time series time indices (e.g. from stats::time)

as.string

logical If as.string is TRUE the string representation of the Date is returned, otherwise a Date object.

Examples

Run this code
# NOT RUN {
index_to_date(2020.25)
# }

Run the code above in your browser using DataLab