Skip to content
Prev 334235 / 398506 Next

rbind/timestamp problem

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