On Dec 25, 2010, at 2:25 PM, Dimitri Shvorob wrote:
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
+ 1033988418.836), class = c("POSIXt", "POSIXct"))), .Names = "t",
row.names
= c(NA,
+ 3L), class = "data.frame")
df$min = trunc(df$t,units="mins")
does not work,
??? seems to "work" on my system. Perhaps you should say what you mean
by "not work"
> df
t min
1 2002-10-07 00:03:26 2002-10-07 00:03:00
2 2002-10-07 03:02:24 2002-10-07 03:02:00
3 2002-10-07 07:00:18 2002-10-07 07:00:00
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid splines stats graphics grDevices utils
datasets methods base
other attached packages:
[1] nlme_3.1-97 lme4_0.999375-37 Matrix_0.999375-46
zoo_1.6-4 ggplot2_0.8.8 proto_0.3-8
reshape_0.8.3 plyr_1.2.1 MASS_7.3-9
[10] rms_3.1-0 Hmisc_3.8-3 survival_2.36-2
sos_1.3-0 brew_1.0-4 lattice_0.19-13
loaded via a namespace (and not attached):
[1] cluster_1.13.2 stats4_2.12.1 tools_2.12.1
Jeff; you will see that my original post suggests familiarity
with 'trunc' :)
--
View this message in context:
http://r.789695.n4.nabble.com/Lost-in-POSIX-tp3052768p3163914.html
Sent from the R help mailing list archive at Nabble.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.
David Winsemius, MD
West Hartford, CT
______________________________________________
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.