On 14/12/2011 16:24, Alex Zhang wrote:
Dear all,

I am using the ISOdatetime function like this:

test.info$TradeTime = with(test.info, mapply(FUN = ISOdatetime, Year, Month, Day, Hour, 
Minute, 60, "EST"))


Where Year, Month etc are all numeric.

I think ISOdatetime should return a POSIXct object. However, the result I 
obtained from the line above is all numeric. Could you please advise? I wish to 
get POSIXct.

ISOdatetime did: mapply threw away the class.
See its SIMPLIFY argument, which defaults to TRUE.
It this case it is unnecessary: e.g.

ISOdatetime(2011, c(11,12), c(30,1), 1, 30, 35, tz="EST")

A 'sec' value of 60 should not be used ... it indicates a leap second which POSIX ignores.


Thank you very much.

- Alex



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@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.

Reply via email to