try:

as.numeric(T3)

Note that this is a typical "r-help" question.

Thomas Petzoldt

------------------------------------------
DataSetb <- data.frame(
  T1 = rep("2012-06-01 1:00", 5),
  T2 = rep("2012-06-02 0:00", 5)
)


T1<- as.POSIXlt(DataSetb$T1)
T2<- as.POSIXlt(DataSetb$T2)

T3<- as.numeric(difftime(T2, T1))
T3


DataSetb.2<- cbind(DataSetb,T3)
write.table(DataSetb.2, file="DataSetb.2.csv", col.names=NA, sep=",")

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to