Learn R Programming

translateSPSS2R (version 1.0.0)

computeDate_moyr: Creates a date with the format month-year

Description

R Implementation of the SPSS DATE.MOYR Function. computeDate_moyr is a helper function for xpssCompute.

Usage

computeDate_moyr(month=NULL, year= NULL)

Arguments

month
atomic numeric or integer.
year
atomic numeric or integer.

Value

Returns a character or character vector of the structure month-year.

Details

An character string as Date. Returns a date value corresponding to the indicated month, and year. The arguments must resolve to integers or numerics, with month between 1 and 12, and year a four-digit integer value.

See Also

computeDate_dmy computeDate_mdy

Examples

Run this code
xpssCompute(x=5, fun="computeDate_moyr", year=2006)
xpssCompute(x=10, fun="computeDate_moyr",year=2010)

Run the code above in your browser using DataLab