OK, I thought I was being explicit enough, but here goes. The out of the first five rows of mu dataframe is: Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity bearing velcat 1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6 180.28 4.352 S (-0.01,5] 2 2009-07-06 16:00:00 16 3.268 3.272 3.240 1441.8 192.34 5.496 SSW (5,10] 3 2009-07-06 17:00:00 17 3.268 3.271 3.240 1300.1 202.29 2.695 SSW (-0.01,5] 4 2009-07-06 18:00:00 18 3.267 3.274 3.241 1099.1 237.16 2.035 WSW (-0.01,5] 5 2009-07-06 19:00:00 19 3.265 3.277 3.243 986.6 237.58 0.896 WSW (-0.01,5] 6 2009-07-06 20:00:00 20 3.266 3.281 3.242 1237.6 205.69 1.257 SSW (-0.01,5]
Time is POSIXct with CST e.g. "2009-07-06 15:00:00 CST" I hope that makes it clearer what the data looks like Tschüß Tony Meissner Principal Scientist (Monitoring) Resources Monitoring Group Science, Monitoring and Information Division Department for Water "Imagine" © (ph) (08) 8595 2209 (mob) 0401 124 971 (fax) (08) 8595 2232 28 Vaughan Terrace, Berri SA 5343 PO Box 240, Berri SA 5343 DX 51103 ***The information in this e-mail may be confidential and/or legally privileged. Use or disclosure of the information by anyone other than the intended recipient is prohibited and may be unlawful. If you have received this e-mail in error, please advise by return e-mail or by telephoning +61 8 8595 2209 -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Prof Brian Ripley Sent: Wednesday, 14 July 2010 3:29 PM To: Ian Seow Cc: r-help@r-project.org Subject: Re: [R] POSIXlt error Check out your timezone. Did something change on that day? You omitted the time, so it is trying to make sense of "1982-01-01 00:00" According to http://en.wikipedia.org/wiki/Singapore_Standard_Time that time did not exist in that time zone (which I am guessing is the one your computer is set to. If I use TZ=Singapore I get > as.POSIXlt("1982-01-01") Error in as.POSIXlt.character("1982-01-01") : character string is not in a standard unambiguous format > as.POSIXlt("1982-01-01 00:00") Error in as.POSIXlt.character("1982-01-01 00:00") : character string is not in a standard unambiguous format > as.POSIXlt("1982-01-01 01:00") [1] "1982-01-01 01:00:00 SGT" > x <- as.POSIXlt("1982-01-01 01:00") > x - 60*60 # an hour earlier [1] "1981-12-31 23:30:00 SGT" On Wed, 14 Jul 2010, Ian Seow wrote: > Oops, sorry! Here it is: > > R version 2.11.1 (2010-05-31) > i386-pc-mingw32 > > locale: > [1] LC_COLLATE=English_Singapore.1252 LC_CTYPE=English_Singapore.1252 > LC_MONETARY=English_Singapore.1252 LC_NUMERIC=C > [5] LC_TIME=English_Singapore.1252 > > attached base packages: > [1] grDevices datasets splines graphics stats tcltk utils > methods base > > other attached packages: > [1] svSocket_0.9-48 TinnR_1.0.3 R2HTML_2.1 Hmisc_3.8-2 > survival_2.35-8 > > loaded via a namespace (and not attached): > [1] cluster_1.12.3 grid_2.11.1 lattice_0.18-8 svMisc_0.9-57 tools_2.11.1 > > > > > > On Wed, Jul 14, 2010 at 10:24 AM, Erik Iverson <er...@ccbr.umn.edu> wrote: > >> Do you care to share your sessionInfo() , as the Posting Guide asks? >> >> I cannot reproduce on: >> >> R version 2.11.1 (2010-05-31) >> i486-pc-linux-gnu >> >> >> >> On 07/13/2010 09:07 PM, Ian Seow wrote: >> >>> Hi, I'm encountering a strange error in POSIXlt... anyone got a clue on >>> this? >>> >>> as.POSIXlt("1982-01-01") >>>> >>> Error in as.POSIXlt.character("1982-01-01") : >>> character string is not in a standard unambiguous format >>> >>>> as.POSIXlt("1992-01-01") >>>> >>> [1] "1992-01-01" >>> >>>> as.POSIXlt("1972-01-01") >>>> >>> [1] "1972-01-01" >>> >>>> as.POSIXlt("1962-01-01") >>>> >>> [1] "1962-01-01" >>> >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.