computeDate_qyr: Creates a date with the format year/quarter

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/xpssComputeDates.R

Description

R Implementation of the SPSS DATE.QYR Function. computeDate_qyr is a helper function for xpssCompute.

Usage

1
computeDate_qyr(day=NULL,month=NULL, year= NULL)

Arguments

day

atomic numeric or integer.

month

atomic numeric or integer.

year

atomic numeric or integer.

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 day between 1 and 31, month between 1 and 12, and year a four-digit integer value.

Value

Returns a atomic character of the structure year / quarter.

Author(s)

Bastian Wiessner

See Also

computeDate_wkyr computeDate_yrday

Examples

1
2
xpssCompute(x=5, fun="computeDate_qyr", month=10, year=2006)
xpssCompute(x=10, fun="computeDate_qyr", month=1, year=2010)

Example output

[1] "2006/04"
[1] "2010/01"

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.