Re: [R] NA instead of time stamp

2012-07-17 Thread Rui Barradas
Hello, Print DateTime, and see what's wrong. When you paste(), you use the order ymd HM with space as separator but when you try to convert to POSIXct you pass a wrong format, not the one created by paste(). Solution: as.POSIXct(DAteTime, format="%Y %m %d %H %M") Hope this helps, Rui Barra

Re: [R] NA instead of time stamp

2012-07-17 Thread arun
DateTime1 #[1] "2009-10-05 00:00:00 EDT" "2009-10-05 00:15:00 EDT"   A.K. - Original Message - From: Yolande Tra To: r-help@r-project.org Cc: Sent: Tuesday, July 17, 2012 10:48 AM Subject: [R] NA instead of time stamp I was wondering why I get instead of the t

Re: [R] NA instead of time stamp

2012-07-17 Thread John Kane
. John Kane Kingston ON Canada > -Original Message- > From: yolande@gmail.com > Sent: Tue, 17 Jul 2012 10:48:28 -0400 > To: r-help@r-project.org > Subject: [R] NA instead of time stamp > > I was wondering why I get instead of the timestamp in the > following.

[R] NA instead of time stamp

2012-07-17 Thread Yolande Tra
I was wondering why I get instead of the timestamp in the following. Thanks. > dataDir <- file.path(wd) > localRaw <- read.csv(file.path(dataDir,"LOCAL.csv"), as.is=T,stringsAsFactors = FALSE) > localRaw[1:2,] Year Month Day hour minute second Temp1mab Temp7mab Temp14mab Salinity1mab 1 2009