[R] ISO 8601 Weeks/Years on Windows with strptime

From: Michael Höhle <Michael.Hoehle_at_stat.uni-muenchen.de>
Date: Thu, 03 Jun 2010 10:57:12 +0200 (CEST)

Dear R-help,

I am working on a R package for public health surveillance where the ISO 8601 representation of dates is of importance. Especially, the ISO Week and ISO Year of a date needs to be extracted. I was quite happy to find all of this implemented in the "Date" class with appropriate calls to strptime/format (using e.g. %G and %V).

However, only later I realized that this functionality is currently not implemented on Windows (I'm a happy Mac/Linux user). As this seriously limits the applicability, I would like to enquire, if there are any plans to make this functionality available in Windows as well? Or are there any good workarounds to make

> format.Date("2001-12-31", "%G")

give "2002" instead of "" on Windows?

Best regards,

Michael Höhle


> sessionInfo()
R version 2.10.0 (2009-10-26)


[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages: [1] surveillance_1.1-6 Matrix_0.999375-31 msm_0.9.7 vcd_1.2-8 [5] colorspace_1.0-1 MASS_7.3-3 maptools_0.7-34 lattice_0.17-26 [9] foreign_0.8-40 sp_0.9-62 spc_0.3 xtable_1.5-6 loaded via a namespace (and not attached):
[1] mvtnorm_0.9-9 splines_2.10.0 survival_2.35-7 tools_2.10.0
> ______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 Jun 2010 - 10:45:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jun 2010 - 11:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive