similar to: bug in all.equal.character (PR#1767)

Displaying 20 results from an estimated 10000 matches similar to: "bug in all.equal.character (PR#1767)"

2001 Oct 04
1
Bug when trying to save a character vector with an embedded / (PR#1115)
Here is an example involving "VIA\B". > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1 minor 3.0 year 2001 month 06 day 22 language
2001 Oct 04
1
Strange behavior with saved character vectors containing a slash
I am seeing some strange behavior using save on a character vector containing a slash. If this is a bug, I will happily submit it (as a single entry! ;-) ) to r-bugs. Here is an example involving "VIA\B". > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status
2002 Apr 08
2
subsetting with NA's
Hi, I often have large dataframes with many variables and many NA's, from which I would like to subset out some rows. Here is a toy example: > x <- data.frame(a = c("x", "y", "z"), b = c(1, NA, 5)) > x a b 1 x 1 2 y NA 3 z 5 I realize that, if I know the values in x$b that I want to subset, things are easy: > x[x$b %in% c(1),] a b 1 x 1
2001 Nov 29
3
package argument to library as string
The help page for library says that: package, help: name or character string giving the name of a package. Yet, I don't seem to be able to use a string variable here. > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1
2002 May 20
1
(PR#1577) is.na<- coerces character vectors to be factors
The inconsistency is that you use $<- to set the column, then [[<- to change it. Had you tried to set the column by x[[1]] <- as.character(x[[1]]) you would have seen the problem immediately (it does not work as you would have intended). If you want to be sure to turn off conversion to factor, you need to set the column to class "AsIs". My belief is that will behave
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
2002 Apr 30
3
rbind'ing empty rows in dataframes in 1.4.1 versus 1.5.0
Hi, In 1.4.1, I was able to create extra "empty" rows in a dataframe as so: > x <- data.frame(a = letters[1:3], b = 1:3) > x a b 1 a 1 2 b 2 3 c 3 > x[4,] a b NA NA NA > rbind(x, x[4,]) a b 1 a 1 2 b 2 3 c 3 NA NA NA > R.version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6
2002 May 29
1
merge.data.frame can coerce character vectors to factor in some circumstances (PR#1608)
If the following two conditions are met: 1) all.x is TRUE 2) at least 1 row in y does not have a match in x then any character vectors in y will be coerced to be factors. Here is a simple example (previously provided on r-devel): > x <- data.frame(a = 1:4) > y <- data.frame(b = LETTERS[1:3]) > y$b <- as.character(y$b) > z <- merge(x, y, by = 0, all.x = TRUE) > z
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create objects of class AsIs: > I("a") [1] "a" attr(,"class") [1] "AsIs" "character" > I(4) [1] 4 attr(,"class") [1] "AsIs" "numeric" > I(4 + 0i) [1] 4+0i attr(,"class") [1] "AsIs" "complex" > This
2001 Oct 04
1
Problems merging with POSIXct objects and all = TRUE
I am having problems using merge with all = TRUE when one of the dataframes has objects of class POSIXct. If this is a bug, let me know and I will report it to r-bugs. Here is an example: > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1
2001 Aug 31
1
--quiet flag sets echo option to TRUE (PR#1083)
The help for options says: echo: logical. Only used in non-interactive mode, when it controls whether input is echoed. Command-line options `--quiet' and `--slave' set this initially to `FALSE'. I don't think that this is correct for me. Consider the following session: mica|junk> ls test.R mica|junk> cat test.R cat("Why was this command
2005 Oct 09
0
all.equal() improvements (PR#8191)
--k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch against R 2.2.0 makes the following improvements to the all.equal() function: 1. Check names! Stock R all.equal() (unlike S-Plus) ignores names completely on some objects. I consider this wrong - if the names are different, the object is NOT "the same". 2. When a
2001 Nov 06
1
R CMD check, undoc and package checking
As cool and wonderful as the package checking tools for R are, I sometimes am stymied when trying to track down a problem. For example, I occasionally see error messages when running R CMD check like the following: [...] * checking Rd files ... OK * checking for undocumented objects ... ERROR * in parse(file, n, text, prompt) : syntax error on line 932 * in undoc(dir =
2002 May 08
3
Suggestions for poor man's parallel processing
Almost all of the heavy crunching I do in R is like: > for(i in long.list){ + do.something(i) + } > collect.results() Since all the invocations of do.something are independent of one another, there is no reason that I can't run them in parallel. Since my machine has four processors, a natural way to do this is to divide up long.list into 4 pieces and then start 4 jobs, each of which
2001 Oct 03
8
Several R vs S-Plus issues
Hi, all, I've been converting code from S-Plus ("S" for short) to R for a few weeks. Here are some differences I've found, aside from the big well-known ones (scoping, models, data storage) and the contents of Kurt Hornik's FAQ section 3.3.3. Let me start with the ones that seem like serious bugs or deficiencies: 1) LETTERS[c(NA,2)] in S is
2001 Oct 03
8
Several R vs S-Plus issues
Hi, all, I've been converting code from S-Plus ("S" for short) to R for a few weeks. Here are some differences I've found, aside from the big well-known ones (scoping, models, data storage) and the contents of Kurt Hornik's FAQ section 3.3.3. Let me start with the ones that seem like serious bugs or deficiencies: 1) LETTERS[c(NA,2)] in S is
2001 Sep 27
5
Reading and writing to S-like databases
Hi, I asked this question 2 years ago, and would like to know if the answer has changed. In S-Plus, I build databases of many large objects. In any given analysis, I only need a few of those objects, but attach'ing the whole database is fine since objects are only read as needed. How can I do the same thing in R, without reading the entire database? One possibility is to treat
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
2002 May 20
0
is.na<- coerces character vectors to be factors within dataframes (PR#1577)
I am not sure if this is a bug within is.na<- or if it lies deeper in the dataframe construction process. Indeed, perhaps it is not a bug at all (in which case I would suggest that the help page for NA be provided with a warning for unsuspecting users (like me)). When used on a character vector within a dataframe, is.na<- coerces the vector to factor. > x <- data.frame(var =
2001 Sep 13
1
rowsum dimnames
Hi, 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