Skip to content
Prev 293710 / 398513 Next

creating a new column assigning values of other columns

It looks like part of your problem is that some of your time/date
variables are stored as factors rather than actual times / dates. Use
str() to see which ones and try to convert those. You'll need this
format string: format = "%d/%m/%y %H:%M:%S" for the ones that are
currently factors.

As regards getting POSIXct out of ifelse(), yes -- that seems to be an
infelicity, but I'm  sure its easily remedied. You just need:

as.POSIXct( ifelse( your_code_here) , origin = "1970-01-01")

Don't add a format string since that refers to the format of the input
(if you're giving a character input), not the output (which is
standardized in the definition of POSIXct)

Michael
On Sun, May 6, 2012 at 5:13 AM, Santiago Guallar <sguallar at yahoo.com> wrote: