[Rd] problem with strptime example (and mention of bug.report) (PR#811)

stephen@anc.ed.ac.uk stephen@anc.ed.ac.uk
Thu, 11 Jan 2001 22:22:49 +0100 (MET)


The help file for strptime has the following code which doesn't work
for me:

     ## read in date info in format `ddmmmyyyy'
     x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
     z <- strptime(x, "%d%b%Y")
> z
[1] "NA" "NA" "NA" "NA"

Do these work for other people?

whereas it works fine if I use a separator (/) in the date@

> strptime("9/Feb/1960", "%d/%b/%Y")
[1] "1960-02-09"

> strptime("9Feb1960", "%d%b%Y")
[1] "NA"


p.s. I failed to send this using bug.report(); on DEC OSF/1, "mailx"
does not recognise the -c switch for setting the carbon copy (CC)
field, causing an error.  One solution might be to remove the -c
argument from the cmdarg in bug.rerport(), or put a 
"~c joe@bloggs.com" directive at the end of the file to set the CC field.

--please do not edit the information below--

 platform = alphaev56-dec-osf4.0f
 arch = alphaev56
 os = osf4.0f
 system = alphaev56, osf4.0f
 status = 
 major = 1
 minor = 2.0
 year = 2000
 month = 12
 day = 15
 language = R

Search Path:
 .GlobalEnv, package:ctest, Autoloads, package:base

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch