similar to: performance issue with as.Date

Displaying 20 results from an estimated 20000 matches similar to: "performance issue with as.Date"

2013 Jan 11
1
Date time conversion bug (as.POSIXct)?
There is something wrong, I think, with the date-time conversion from a numeric value if you use Central European Time (CET) as timezone. Examples from R: If I use the GMT time zone it is OK, I get the same time back from as.POSIXct as I entered > as.POSIXct(as.numeric(strptime("30/01/2012 13:00:00", format="%d/%m/%Y >
2002 Apr 08
1
Problem(?) in strptime()
I think the following examples illustrate the crux of the matter (version and OS info are below). The problem has to do with the transition from standard time to daylight savings time. My timezone, US/Pacific, has two parts: standard time (PST) 8 hours behind GMT and daylight savings time (PDT) 7 hours behind GMT. The transition takes place this year on 7 April at 02:00, when 02:00 is
2020 Nov 01
0
strptime() keeps emitting warnings after establishing a handler with tryCatch()
Hello, I cannot reproduce this behavior and, as documented, the posted code doesn't issue warnings due to a wrong timezone but I'm running sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK:
2020 Oct 31
2
strptime() keeps emitting warnings after establishing a handler with tryCatch()
Dear list members, I have come about a peculiar behavior in R (4.0.2) which I would describe as a bug. On macOS, where `strptime()` raises a warning for invalid timezone identifiers, the following code will continue to raise the original warning with every subsequent call to `strptime()`: ``` # attach a handler for warnings for this call only: tryCatch(strptime('2020-10-31 18:30', format
2002 Apr 08
1
Problem(?) in strptime() -- short version
I decided my earlier email on this topic was rather long and wordy; here's a condensed version. I am sitting at a Solaris computer in the US/Pacific timezone. I have a file of data having times that includes the following three values 2002-4-7 1:30:00 GMT 2002-4-7 2:30:00 GMT 2002-4-7 3:30:00 GMT I have not been able to find a way to correctly convert these to either of the POSIX
2004 Jun 02
2
Bug with date 1970-01-01 on Windows (PR#6929)
Full_Name: Martin Lenze Version: 1.8.0 alpha (2003-09-18) OS: Microsoft Windows 2000 [Version 5.00.2195], SP4 Submission from: (NULL) (82.82.76.131) Seems to be related to PR#1332... Hello, I get: > Sys.getlocale() [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=English_United States.1252" >
2016 Feb 04
3
Fwd: [musl] strptime() question
There is incompatibility between R strptime and musl libc. I posted about it on their mailing list, but they need more information I can't provide, so I'm forwarding the message here in hope R developers can help. Thanks. ---------- Forwarded message ---------- From: Rich Felker <dalias at libc.org> Date: Thu, Feb 4, 2016 at 2:07 PM Subject: Re: [musl] strptime() question To: Alba
2012 Nov 07
0
Strange behaviour in as.Date
I have been having trouble passing a default argument to base::as.Date.character and think it is due to some funkiness in the function definition. base::as.Date.character is defined as function (x, format = "", ...) { # stuff deleted res <- if (missing(format)) charToDate(x) else strptime(x, format, tz = "GMT") as.Date(res) } which gives
2011 Jul 26
2
How to use as.Date (or something else) with "31-Jul-2010 23:59:00"
Hello I have a huge file (not an R-file) in which the first column is a string with date, hour, minutes and seconds (For instance, "31-Jul-2010 23:59:00"). I tried as.Date but the error msg was "Error in charToDate(x) : character string is not in a standard unambiguous format". I have checked the help for the function as well as date but to no avail. How can that sort
2007 Feb 16
0
Request: make as.POSIXlt generic
In the base package, as.POSIXct() is an S3 generic function, but as.POSIXlt() is not. As shown below, the current implementation is already crying out to be refactored into a generic function with methods for various classes. It calls "inherits" five times. Not only is this bad style, it also disallows me or anyone else from making as.POSIXlt() work with other kinds of time-ish
2018 Mar 06
0
raster time series statistics
Hi Herry, This is probably due to a call to strptime (or similar). No, it doesn't accept %Y-%m as a valid format. Maybe add a constant day to all the dates as that will work: dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2), year=sort(rep(2016:2017,12))) timelst<-paste(unlist(dt['year']),unlist(dt['month']),"01",sep="-")
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All In trying to correlate some tide gauge data I need to deal with varying timezones. From the documentation on strptime, it seemed that the tz variable might have some effect on the conversion, but I'm not seeing an effect. > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0 [1] "2006-12-01 01:02:00 EST" >
2002 May 03
1
Daylight savings time and conversion to POSIXt (arghh!)
I have asked this question before, and received some suggestions for work-arounds that get the job done--and they are much appreciated. But I would still like to find out if I'm missing something, and whether there is a direct way using POSIXt functions (as.POSIXct, as.POSIXlt, strptime, in particular). I have environmental data collected once per minute. Here is a subset of 3 input
2016 Mar 12
0
Regression in strptime
OK, .Internal is not necessary to reproduce oddity in this area. I also see things like (notice 1980) > strptime(paste0(sample(1900:1999,80,replace=TRUE),"/01/01"), "%Y/%m/%d", tz="CET") [1] "1942-01-01 CEST" "1902-01-01 CET" "1956-01-01 CET" "1972-01-01 CET" [5] "1962-01-01 CET" "1900-01-01 CET"
2005 Dec 05
1
Automatic time zone conversion
Dear R-help, I was trying to convert a date and time record extracted from a fortran subroutine I worte and I encounter some problem. The data read in time and date in a format like "2000-05-11_01:00:00.0000" in fortran output. It is in GMT. I need to convert it to CST (GMT+8). I did the following steps. > cdate [1] "2000-05-11_01:00:00.0000\005\003" # I am not sure
2012 Jan 11
0
Error in charToDate(x)
Dear all, I have a problem while working with hourly data of fx rates. I've read from a csv file, the following way: csv-file like: Date,Open,High,Low,Close,Volume 2011-08-11 03:00:00,1.41758,1.42205,1.41625,1.42174,8974 ... 2011-08-12 04:00:00,1.42175,1.42413,1.42067,1.42172,7229 ... 2011-12-30 05:00:00,1.42173,1.42341,1.42062,1.42171,6703 ... raw<-
2009 Nov 12
1
xts conversion problem
I have two data frames, with two columns each, the first being a Date variable. I would like to convert them to xts objects, indexed by the Date column. I would like to use as.Date and not as.POSIXct as the dateformat. The puzzling fact is that it works for the first one but not the other. Here is a screenshot of the error: > str(DF1) 'data.frame': 367 obs. of 2 variables: $
2011 Jun 01
2
Problems Dating....
I'm trying to convert a column in a data frame with dates from a "Factor" type to a "Date Object" but I am encountering and error. (I am having trouble plotting an x,y scatter and I suspect it's something with my data format). I have a table with two columns and 8,000 rows. > dsort=read.delim("C:\\Documents and Settings\\E066582\\My
2017 Apr 06
3
as.POSIXct character string is not in a standard unambiguous format
Hi Ben Thanks for your answer I have already tried this, as well as x <- as.POSIXct(strptime("2002-02-02 02:02", "%Y-%m-%d %H:%M")) It works! But it does not fix it widely for all tests used during the "make check" step at compile time. Unless I patch all of them. There is something with localtime but I cannot find what. On another machine with another
2012 Jan 11
2
Checking dates for entry errors
Hello Everyone, ? I have a question about how best to check dates for?entry errors. I recently discovered that R will read?the incorrectly entered date "11/23/21931" without producing a warning or an?error message at least under some circumstances. ? > as.Date("11/23/21931", format = "%m/%d/%Y") [1] "2193-11-23" > as.Date("21931-11-23")