similar to: base::as.Date inconsistency/bug

Displaying 20 results from an estimated 10000 matches similar to: "base::as.Date inconsistency/bug"

2013 Apr 24
1
Floating point precision causing undesireable behaviour when printing as.POSIXlt times with microseconds?
Dear list, When using as.POSIXlt with times measured down to microseconds the default format.POSIXlt seems to cause some possibly undesirable behaviour: According to the code in format.POSIXlt the maximum accuracy of printing fractional seconds is 1 microsecond, but if I do; options( digits.secs = 6 ) as.POSIXlt( 1.000002 , tz="", origin="1970-01-01") as.POSIXlt( 1.999998 ,
2013 Apr 17
1
POSIXt oddness at end of 1969
A user here noticed the following difference between Linux and Windows versions of R-2.15.3 (and R-3.0.0, I think) when using times within a second of the end of 1969: f <- function (sec = -1) { x1 <- as.POSIXct(c(2 * sec, sec, 0), origin = "1970-01-01", tz = "UTC") x2 <- as.POSIXlt(x1) x3 <- as.POSIXct(x2, origin = "1970-01-01", tz =
2010 Apr 30
1
as.character() crashes R 2.11 on Win2008 x64 and Win7 64
Dear List, I have a Date vector, and converting to character causes R&nbsp;2.11 to&nbsp;crash on one machine running Win2008 x64 and another running Win7 x64. The code runs fine on R 2.10. For example, x &lt;-&nbsp;as.Date(rep(1:15000, 10), '1970-01-01') y &lt;- as.character(x) At this point, Rgui crashes. I get this using both the 32 and 64 bit 2.11.0 R
2010 Apr 30
1
Possible bug in POSIX classes for R 2.11.0?
To the R development team; I found an unusual behavior in zoo when I upgraded to R 2.11.0 - it abruptly terminated when I performed certain operations on large zoo objects. I sent an e-mail to Achim Zeileis and he said this was a potential bug that I should report to the R development team. The details are given below in the thread below. Basically, I can crash R with this code: library(zoo)
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" >
2002 Feb 28
1
Bug in julian() (PR#1332)
Full_Name: Michael Jacob Version: 1.4.1 OS: Windows 2000 SP2 Submission from: (NULL) (195.27.237.226) Hi, there seems to be a bug in julian(): > 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" > julian(Sys.time()) Error in fromchar(x) : character string is not in a
2010 Feb 12
2
Unexpected behaviour of x[i] when i is a matrix, on Windows
Hi, when running the following on different instances of R (Linux and Windows), I get different results. The one for Linux seems to be the intended / documented one. When using numeric indices rather than characters, Windows seemed to behave as expected. -----------On Windows-------------- x = matrix(FALSE, nrow=3, ncol=3) colnames(x) = LETTERS[1:3] rownames(x) = letters[1:3] x # A
2009 Dec 22
1
as.Date function yields inconsistent results (PR#14166)
Full_Name: Mario Luoni Version: 2.10.0 OS: Windows XP HE SP3 Submission from: (NULL) (217.194.59.134) This piece of code: zzz1 <- as.POSIXct("1999-03-18", tz="CET") zzz2 <- as.POSIXlt("1999-03-18", tz="CET") zzz1 == zzz2 as.Date(zzz1) as.Date(zzz2) yields TRUE for "zzz1==zzz2", but the two dates returned by as.Date are different: >
2010 Apr 23
1
doBy and Hmisc on R version 2.11.0
I installed R 2.11.0, and I don't think I can load the doBy package now. Any suggestions? > library("doBy") Loading required package: survival Loading required package: splines Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) : there is no package called 'Hmisc' Error: package/namespace load failed for 'doBy' > sessionInfo() R version 2.11.0
2010 Jun 09
1
Problem with library(SSPA)
Hello, I have the fellowing problem and I am thankful for any advice! Regards, Samuel ################################################################ >   source("http://bioconductor.org/biocLite.R") BioC_mirror = http://www.bioconductor.org Change using chooseBioCmirror(). >     biocLite("SSPA") Using R version 2.11.0, biocinstall version 2.6.7. Installing
2010 Apr 19
1
Issue with aggregate.ts and/or %\% on Windows
I've stumbled across an issue with aggregate.ts that either is due to a misuse of %/% or something deeper relating to numerical precision on Windows. The test code is x <- rep(6:10, 1:5) as.vector(aggregate(as.ts(x), FUN = mean, ndeltat = 5)) On Linux and Mac I get the correct answer > x <- rep(6:10, 1:5) > as.vector(aggregate(as.ts(x), FUN = mean, ndeltat = 5) [1] 7.2 8.8
2011 Jul 06
1
trouble parsing a date using strptime()
Hi, I am having a trouble parsing dates using strptime() that I get in the format of year and week number. The data looks like this "201127" which means year 2011 and week 27. I would like to graph this using ggplot but then I get a gap between 201054 and 201101 so I thought I would just easily convert it. I tried to use strptime and as.Date and the format string of %Y%W but it seems
2010 Apr 28
1
rJava (installation?) problem: unable to find the basic String class
Hello, I have experienced the following problem after installing rJava (it being a prerequisite for another package in which I am relly interested). Any helpful thoughts would be appreciated: OS: Windows XP Professional 2002 SP3, have Java 6 Update 20 from Sun, also installed the JDK from http://java.sun.com/javase/downloads/index.jsp (or at least I suspect I installed it as it asked to re-boot
2010 May 28
5
difference in sort order linux/Windows (R.2.11.0)
Dear R users, I'm a bit perplexed with the effect sort has here, as it is different on Windows vs. linux. It makes my factor levels and subsequent plots different on the two systems. Given: types <- c("PC-D-Euro-0", "PC-D-Euro-1", "PC-D-Euro-2", "PC-D-Euro-3", "PC-D-Euro-4", "PC-D-Euro-5", "PC-D-Euro-6",
2011 Jul 19
2
strange problem with strptime and date variable
Hello all, I am manipulating a large database with 70,000 records. "strptime" generates a date variable but R treats some of the values as NA. I attach a simple example below. I have spent hours on this problem. Any hint would be greatly appreciated. Many thanks, Edwin Sun # =======start of sample code ============= > x <- c("2005-04-02 19:03:00", "2005-04-03
2010 Mar 18
1
How to read.table with “Hebrew” column names (in R)?
(I am reposting this question after a few months without a solution...) Hi all, I am trying to read a .txt file, with Hebrew column names, but without success. I uploaded an example file to: http://www.talgalili.com/files/aa.txt And tried the command: read.table("http://www.talgalili.com/files/aa.txt", header = T, sep = "\t") This returns me with: X.....ª X...ª......
2009 Oct 15
2
forwarded: bug (?) in cut.POSIXt with "breaks"=integer
From: Vitalie S. <vitosmail <at> rambler.ru> Subject: Bug in cut.POSIXt Newsgroups: gmane.comp.lang.r.general Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago) Hello Everyone, Before reporting decided to post here first: tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class = c("POSIXt",
2010 May 24
1
Error during wrapup: cannot open the connection
I am trying to use a new (to me) package (samr) and even when I try to run a very simple example, I get this "cannot open the connection" error. The reason I am writing to r-help rather than to the authors of samr is I think this may be a more general R problem rather than a samr-specific problem. Perhaps something with my installation and write access to some particular place ? I am
2010 Apr 27
1
Should mcnemar.test use as.factor instead of factor
I am working with the mcnemar.test function and the help does not show a maintainer/author, but it is part of the stats package. My issue is that I want to use the test on 2 variables with possible values of 0:3, in one of the tests one of the variables does not have any 3's, so to make sure that the matrix is square I do: > x <- factor(x, levels=0:3) > y <- factor(y, levels=0:3)
2010 May 28
1
Problem loading RGtk2 (iconv.dll)
Hello dear R-help list and Michael Lawrence. I wish to use GTK with R. I installed the newest RGtk2 and GTK from: http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-devel/2.12.9/gtk-dev-2.12.9-win32-2.exe/download on the path: C:\Program Files\Common Files\GTK\2.0\ And followed the instructions on the installation manual for RGtk2, and added the line: GTK_PATH=C:/Program Files/Common