Hello:
What is the recommended method for retaining the tzone attributes
when concatonating POSIXct objects?
(d1 <- ISOdate(1970,1,1)) # Sets the tzone attribute = GMT
[1] "1970-01-01 12:00:00 GMT"
(d1.2 <- c(d1, d1)) # c(..) strips the tzone attribute, displays in
the time zone of the operating system
[1] "1970-01-01 04:00:00 PST" "1970-01-01 04:00:00 PST"
attr(d1.2, 'tzone') <- 'GMT'
d1.2 # tzone attribute manually restored
[1] "1970-01-01 12:00:00 GMT" "1970-01-01 12:00:00 GMT"
"c" is a generic function with a method defined for objects of
class POSIXct, so the results here were what is returned by c.POSIXct
[as discussed with help('c.POSIXct')].
Is there some other function like "c2", say, that tries to retain
attributes where "c" strips all but names?
Thanks,
Spencer
--
Spencer Graves, PE, PhD
President and Chief Technology Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph: 408-655-4567
web: www.structuremonitoring.com
______________________________________________
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.