[R] Dates stuff ... beginner question

MMarques Power mmarques at inescporto.pt
Thu Apr 15 17:06:50 CEST 2004



Putting it simly I have a date in format YYYYMMDD
Year month day
20030301
and I need simply the day of the week as an integer or even as
string...
according to the documentation in ISOdate or strptime functions
I need to format it ...

If I try something like :

strptime("20030301","%u")
[1] "2004-04-15"

being %u the format value I need
but as result I get the system actual date ??!?...

Using Windows XP and the latest R1.9.0
I need something like 1 for sunday and the sequent values for the rest
of the week.
What am I doing wrong...?
Any help is welcomed...

                      Thanks in advance
                      Marco Marques




More information about the R-help mailing list