convert_date: Convert to Acceptable Date

Description Usage Arguments Value

View source: R/utils.R

Description

Converts a Date vector into its equivalent daily, monthly, yearly, etc... Date vector.

Usage

1
convert_date(x, convert_type = "months", convert_to_n = 1)

Arguments

x

Input vector of class Date.

convert_type

Default: "months". String value indicating the date type. Possible values are "days", "months".

convert_to_n

Default: 1. Numeric value indicating the number of convert_types to convert to.

Example: convert_type="months" and convert_to_n=3 indicates a quarterly conversion.

Value

Converted Date vector of class mdpms.Date with attributes adder (function that adds units), convert_to_n, and convert_type.


mdsstat documentation built on March 13, 2020, 2:58 a.m.