[R] rbind/timestamp problem

Georg Hörmann ghoermann at hydrology.uni-kiel.de
Tue Dec 10 14:55:07 CET 2013


Hello world,

I am stuck somehow...
I am trying to add a timestamp to a sensitivity matrix:

#this code works:

sensitivity=data.frame(mtype=1,cdate=2)
sensitivity=rbind(sensitivity,c(mtype=2,cdate=2))

# this code does not work - no idea why

sensitivity=data.frame(mtype=1,cdate=as.POSIXct(Sys.time(), 
origin="1970-01-01"))
sensitivity=rbind(sensitivity,c(mtype=2,cdate=as.POSIXct(Sys.time(), 
origin="1970-01-01")))

Error message:
"Error in as.POSIXct.numeric(value) : 'origin' must be supplied"

Any hints why the second part does not work?

Greetings,
Georg

-- 
Georg Hoermann, Dep. of Hydrology, Ecology, Kiel University, Germany
+49/431/2190916, mo: +49/176/64335754, icq:348340729, skype: ghoermann



More information about the R-help mailing list