similar to: merge() generates a factor: bug?

Displaying 20 results from an estimated 7000 matches similar to: "merge() generates a factor: bug?"

2002 Aug 15
1
order(1, na.last=NA) fails (PR#1913)
R> order(1, na.last=NA) Error in apply(sapply(z, is.na), 1, any) : dim(X) must have a positive length This bug appears unrelated to PR#1906, and so the fix of 8/15 doesn't help. It comes from the line inside order(): ok <- !apply(sapply(z, is.na), 1, any) where z=list(1) in my example. sapply() returns a single-element vector, not a matrix, making apply() unhappy. This might
2001 Dec 10
1
Documentation of .Last.lib in library() (PR#1209)
help(library) says: "`.Last.lib' is called when a package is loaded." Probably should be "...is detached." -- David Brahm (brahm@alum.mit.edu) --please do not edit the information below-- Version: platform = sparc-sun-solaris2.6 arch = sparc os = solaris2.6 system = sparc, solaris2.6 status = major = 1 minor = 3.1 year = 2001
2002 May 13
1
prettyNum inserts leading commas (PR#1548)
Under R-1.5.0 on Solaris 2.6: R> prettyNum(123456789, big.mark=",") [1] ",123,456,789" and that bad behavior (leading comma) spills into formatC as well: R> formatC(123456789, digits=0, format="f", big.mark=",") [1] ",123,456,789" Looks to me like a bug in src/library/base/R/format.R, in function prettyNum: B.[i.big] <-
2001 Oct 22
1
round() doesn't (PR#1139)
R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". This is in 1.3.1 on Solaris 2.6 (full description at bottom). [Apologies for making everyone read this 3 times; my bug.report() burped.] Peter Dalgaard <p.dalgaard@biostat.ku.dk> says the problem is in fround.c, which reads in part:
2002 Mar 08
2
Sys.putenv environment variables disappear (PR#1371)
Environment variables set with Sys.putenv() disappear (i.e. become "") after a while, especially after heavy-duty I/O. Example: R> x <- matrix(1., 3000, 3000) R> save(x, file="myx.RData") R> Sys.putenv(HOME="/tmp") R> while (Sys.getenv("HOME") != "") {cat("ok\n"); load("myx.RData")} The loop prints
2001 Dec 10
0
Re: bug.report() sends empty message (PR#1158)
On Oct 22, I sent an empty bug report (#1138) because bug.report() "ate my message". Paul Gilbert opened a new bug report (#1158) for this problem. I'm now convinced it's because I had an apostrophe in the subject line ("round() doesn't"). The bug.report documentation specifically warns against this, but the bug.report() function could also check for it! I
2001 Nov 30
0
Problems with environmental variables set with Sys.putenv
Environment variables set with Sys.putenv() "disappear" spontaneously (and somewhat randomly) when I load large datasets. This was reported in R-help by Dave Kane on June 4, 2001; I have not seen any further discussion. I'm not sure if I can report it as a "bug", since it is not entirely reproducible. Could someone try this and see if you have trouble too? The following
2002 Aug 13
2
Misalignment of <NA> in rownames (PR#1905)
An NA in the rownames of a matrix (or dataframe) causes misalignment when the matrix is printed: R> x <- matrix(1:12, 3,4, dimnames=list(letters[1:3], LETTERS[1:4])) R> rownames(x)[2] <- NA R> x A B C D a 1 4 7 10 <NA> 2 5 8 11 c 3 6 9 12 The bug is in function Rstrlen, in src/main/printutils.c. MatrixRowLabel and MatrixColumnLabel (same file) rely on Rstrlen
2016 Jun 08
1
Trivial patch for merge.Rd
Hi all, After replying to r-help earlier today on the merge() related thread, I noted a trivial grammatical error in the description for the 'suffixes' argument in it's help file. A patch against the current SVN trunk version of merge.Rd in ..library/base/man is attached and pasted here: --- merge1.Rd 2016-06-08 13:34:35.000000000 -0500 +++ merge2.Rd 2016-06-08 14:03:34.000000000
2002 Apr 10
5
Funny characters in x11 window title (PR#1451)
In R-1.5.0pre (2002-04-08) on Solaris 2.6, the window that X11() creates has a title like: R Graphics: Device 2 (ACTIVE) o iyeP )( y except the funny characters at the end have umlauts and other accents (i.e. extended ASCII characters), and they may be different each time X11() is invoked. There is no loss of functionality; it just looks a little ugly. I saw this behavior in R-1.3.?, it
2002 Jul 23
1
colClasses = "logical" produces all FALSE when input is 1/0
It seems to me that colClasses = "logical" in read.table produces incorrect results when the input file has `1' and `0' in it. Although, it is perhaps just as likely that I am misunderstanding the documentation. Here is a simple example: > file.show("test.txt") x 1 0 1 > read.table("test.txt", header = TRUE) x 1 1 2 0 3 1 This result is fine. >
2003 Jul 11
1
Title obscured when using par(mfrow) (PR#3463)
I want to put multiple plots on a page using par(mfrow), then a single title at the top. This should work, but doesn't: R> par(oma=c(0,0,4,0), mfrow=c(3,4)) R> for (i in 1:12) {plot(1); title(i)} R> ## text(10,10, ".") R> par(mfrow=c(1,1), oma=c(0,0,1,0)) R> title("Main Title") The main title does not appear. However, uncommenting the third line
2001 Sep 14
1
rowsum dimnames (PR#1092)
The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.: > rowsum(matrix(1:12, 3,4), c("Y","X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives the
2003 Aug 13
2
rowsum() may return a vector instead of a matrix (PR#3737)
If all rows are in the same "group", rowsum() returns a vector instead of a (1xN) matrix, contrary to documentation: R> print(z <- rowsum(matrix(1:12, 3,4), rep("x",3))) [1] 6 15 24 33 R> dim(z) NULL It worked correctly in version 1.4.0 but was broken by version 1.6.1. I'm currently using 1.7.1 under Solaris 2.8. --please do not edit the information
2001 Dec 14
2
colSums in C
Hi, all! My project today is to write a speedy colSums(), which is a function available in S-Plus to add the columns of a matrix. Here are 4 ways to do it, with the time it took (elapsed, best of 3 trials) in both R and S-Plus: m <- matrix(1, 400, 40000) x1 <- apply(m, 2, sum) ## R=16.55 S=52.39 x2 <- as.vector(rep(1,nrow(m)) %*% m) ## R= 2.39 S= 8.52 x3 <-
2002 May 29
1
warning message for setAs when using class AsIs
This seemed too advanced for r-help and is related to the recent discussion of character vectors in dataframes. Following Brian Ripley's most excellent advice, we are moving to a world in which character vectors in dataframes are always of class AsIs. The cool way of doing this seemed to be the following: > cat(c("x", "y", "z"), file = "test.txt",
2002 Apr 29
2
Lost Tcl/Tk support
In prior versions, as recent as R-1.5.0pre (2002-04-08), Tcl/Tk support worked just fine, with "configure" (no flags) finding /usr/local/lib/tclConfig.sh and /usr/local/lib/tkConfig.sh. In Monday's official release of R-1.5.0, Tcl/Tk support now fails for me (under Solaris 2.6): ... checking for tclConfig.sh... no checking for tclConfig.sh in library (sub)directories... no
2002 Jun 14
0
pretty() sometimes isn't
Hi all, R> seq(-.4, .8, length=7) [1] -4.000000e-01 -2.000000e-01 5.551115e-17 2.000000e-01 4.000000e-01 [6] 6.000000e-01 8.000000e-01 Well that may not be a "bug", but it has this unfortunate consequence: R> pretty(c(-.4,.8)) [1] -4.000000e-01 -2.000000e-01 5.551115e-17 2.000000e-01 4.000000e-01 [6] 6.000000e-01 8.000000e-01 And thus my plot axes look funny
2001 Oct 22
3
round() doesnt (PR#1138)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
2001 Oct 09
0
Problems merging with POSIXct objects and all = TRUE (PR#1121)
I am having problems using merge with all = TRUE when one of the dataframes has objects of class POSIXct. Here is an example: > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1 minor 3.0 year 2001