Re: [R] Lost in POSIX

2010-12-26 Thread Jeff Newmiller
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, Jeff; you will see that my original post

Re: [R] Lost in POSIX

2010-12-26 Thread Jeff Newmiller
Dimitri Shvorob wrote: .. One issue with the solution proposed by Jeff is that the transformed column does not have the original's type: x = structure(list(time = structure(c(1020232904.818, 1020232904.818 ), class = c(POSIXt, POSIXct), tzone = ), price = c(321, 323.5), minute = c(1020232860,

Re: [R] Lost in POSIX

2010-12-26 Thread David Winsemius
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

Re: [R] Lost in POSIX

2010-12-25 Thread Dimitri Shvorob
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, Jeff; you will see that my original post suggests familiarity with

Re: [R] Lost in POSIX

2010-12-25 Thread Dimitri Shvorob
.. One issue with the solution proposed by Jeff is that the transformed column does not have the original's type: x = structure(list(time = structure(c(1020232904.818, 1020232904.818 ), class = c(POSIXt, POSIXct), tzone = ), price = c(321, 323.5), minute = c(1020232860, 1020232860)), .Names =

Re: [R] Lost in POSIX

2010-11-23 Thread Jeff Newmiller
Dimitri Shvorob wrote: Nor would I call this much of an improvement in clarity... what about min? You want to know the minimum? LOL. (And apologies for the insensitivity). Thank you for help, Jeff. This works, but I am still curious to see a solution based on trunc, if anyone can find it.

Re: [R] Lost in POSIX

2010-11-22 Thread Dimitri Shvorob
df$dt - as.Date(df$t) Thank you, David, but I need a *time* value. day was a confusing special case; how about min? -- View this message in context: http://r.789695.n4.nabble.com/Lost-in-POSIX-tp3052768p3053146.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Lost in POSIX

2010-11-22 Thread Jeff Newmiller
Dimitri Shvorob wrote: df$dt - as.Date(df$t) Thank you, David, but I need a *time* value. day was a confusing special case; how about min? Your original question was NOT clear on this point... it was not David's fault your question was confusing, and you haven't even hinted at an

Re: [R] Lost in POSIX

2010-11-22 Thread Dimitri Shvorob
Nor would I call this much of an improvement in clarity... what about min? You want to know the minimum? LOL. (And apologies for the insensitivity). Thank you for help, Jeff. This works, but I am still curious to see a solution based on trunc, if anyone can find it. -- View this message in

[R] Lost in POSIX

2010-11-21 Thread Dimitri Shvorob
Can someone please fix this snippet? (i.e. append to the dataframe a column containing truncated time value)? 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) # Try 1

Re: [R] Lost in POSIX

2010-11-21 Thread David Winsemius
On Nov 21, 2010, at 3:52 PM, Dimitri Shvorob wrote: Can someone please fix this snippet? (i.e. append to the dataframe a column containing truncated time value)? df = structure(list(t = structure(c(1033963406.044, 1033974144.847, 1033988418.836), class = c(POSIXt, POSIXct))), .Names = t,