[Rd] format() under Windows giv wrong resuts with posix data (PR#12770)

2008-09-10 Thread pego . enrico
Full_Name: Enrico Pegoraro
Version: 2.7.2
OS: Windows
Submission from: (NULL) (87.4.187.101)


The 
format(timevar,format="%I:%M:%S %p")
instruction, with "timevar" a "POSIXt"  "POSIXlt" variable, give wrong return
data.
The format sentence string "%I:%M:%S %p" requires times with AM/PM indicator,
but the resulting output doesn't contain it.
Example:
> pippo=strptime("23:43:12", format="%H:%M:%S")
> pippo
[1] "2008-09-10 23:43:12"
> class(pippo)
[1] "POSIXt"  "POSIXlt"
> format(pippo, format="%I:%M:%S %p")
[1] "11:43:12 "

Note that in linux version of R format() works correctly.
Best regards
Enrico

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] A strange behaviour of file.path in Windows? (PR#13119)

2008-10-03 Thread pego . enrico
Full_Name: Enrico Pegoraro
Version: 2.7.2
OS: Windows (Vista or Xp PRO) Italian
Submission from: (NULL) (87.4.189.202)


If you send these lines of code:

outdir="c:/pippo"
file.path(outdir,"pluto.html")

R replies correctly:

[1] "c:/pippo/pluto.html"

But if you change the first steps to:

outdir=""
file.path(outdir,"pluto.html")

R replies (uncorrectly, I think)

[1] "/c:/pippo/pluto.html"

This problem influence the R2HTML package too, which, if you send a line as:

targetHtml=HTMLInitFile(outdir="",filename="htmlFile",Title ="Title")

in windows it submit an error because of file.path() error.

Thank you
Enrico

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel