Learn R Programming

translateSPSS2R (version 1.0.0)

computeXdate_week: Calcualtes the calendar week on basis of a given date

Description

R Implementation of the SPSS XDATE.WEEK Function. computeXdate_week is a helper function for xpssCompute.

Usage

computeXdate_week(x=NULL)

Arguments

x
atomic object of class character, POSIXlt or POSIXt holding date data.

Value

Returns a character string with the calendar week.

Details

computeXdate_week caluclates the calendar week on basis of the given date string.

See Also

computeXdate_date computeDate_wkyr

Examples

Run this code
xpssCompute(x="2015-02-15 20:11:20", fun="computeXdate_week")
xpssCompute(x="2022-10-20 21:22:12", fun="computeXdate_week")

Run the code above in your browser using DataLab