Displaying 20 results from an estimated 10000 matches similar to: "broken save(..., compress="xy")"
2011 Sep 23
2
cbind() crashes on raw vectors
Hi,
cbind() doesn't seem to like raw vectors:
> df <- cbind(a=integer(4000), b=raw(4000))
> df
*** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc():
memory corruption: 0x0000000002d73ca0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x79d7a)[0x7f3592b91d7a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7f3592b9431e]
2011 Dec 07
4
bug in rank(), order(), is.unsorted() on character vector
Hi,
This looks OK:
> x <- c("_1_", "1_9", "2_9")
> rank(x)
[1] 1 2 3
But this does not:
> xa <- paste(x, "a", sep="")
> xa
[1] "_1_a" "1_9a" "2_9a"
> rank(xa)
[1] 2 1 3
Cheers,
H.
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1]
2011 Dec 09
3
bug in sum() on integer vector
Hi,
x <- c(rep(1800000003L, 10000000), -rep(1200000002L, 15000000))
This is correct:
> sum(as.double(x))
[1] 0
This is not:
> sum(x)
[1] 4996000
Returning NA (with a warning) would also be acceptable for the latter.
That would make it consistent with cumsum(x):
> cumsum(x)[length(x)]
[1] NA
Warning message:
Integer overflow in 'cumsum'; use
2010 Mar 31
1
as(1:4, "numeric") versus as.numeric(1:4, "numeric")
Hi,
> class(as(1:4, "numeric"))
[1] "integer"
Surprising but an explanation could be that an integer
vector being a particular case of numeric vector, this
coercion has nothing to do because 1:4 is already numeric.
And indeed:
> is.numeric(1:4)
[1] TRUE
> is.numeric(as(1:4, "numeric"))
[1] TRUE
However, 'as(1:4,
2009 Jun 02
2
formal argument "envir" matched by multiple actual arguments
Hi list,
This looks similar to the problem reported here
https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html
by Henrik Bengtsson a long time ago. It is very sporadic and
non-reproducible.
Henrik, do you remember if your code was using reg.finalizer()?
I tend to suspect it but I'm not sure.
I've been hunting this bug for months but today, and we the help of other
Bioconductor
2009 Jul 16
1
Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)
On 15/07/2009 8:08 PM, Herv? Pag?s wrote:
> Hi,
>
> > x <- c(a=10, b=20)
> > length(x) <- 1
> > x
> a
> 10
>
> But with gctorture turned on, I get:
>
> > gctorture(TRUE)
> > x <- c(a=10, b=20)
> > length(x) <- 1
> > x
> a
> "a" <---- ???
>
> > x <-
2011 Aug 02
0
png() broken in R-devel
Hi,
Seems like this recent change broke the png() device:
hpages at latitude:~/svn/R-devel/src/library/grDevices/src$ svn diff -r
56568:56569
Index: cairo/Makefile.in
===================================================================
--- cairo/Makefile.in (revision 56568)
+++ cairo/Makefile.in (revision 56569)
@@ -38,7 +38,8 @@
R: Makefile
@$(MAKE) $(cairo_la)
- @cp $(cairo_la)
2009 Jul 15
1
Protection stack overflow
Hi,
> gctorture(TRUE)
> setGeneric("foo", function(x, y) standardGeneric("foo"))
[1] "foo"
> setMethod("foo", c("ANY", "ANY"),
+ function(x, y) cat("calling foo,ANY,ANY method\n")
+ )
Error: protect(): protection stack overflow
Sorry this is something I already reported one week ago here
2009 Sep 24
1
crash with NAs in subscripted assignment of a raw vector
Hi,
> x <- charToRaw("ABCDEFGx")
> x[c(1:3, NA, 6)] <- x[8]
*** caught segfault ***
address 0x8402423f, cause 'memory not mapped'
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Cheers,
H.
> sessionInfo()
R version 2.10.0 Under development
2010 Jun 03
1
named empty list
Hi,
I just realized that a named empty list is displayed the same
way as an empty list:
> list(aa=2:5)[0]
list()
> list()
list()
For empty atomic vectors, the print method makes the difference:
> c(aa=3L)[0]
named integer(0)
> integer(0)
integer(0)
Maybe lists could do that too?
Thanks,
H.
> sessionInfo()
R version 2.12.0 Under development (unstable)
2011 Dec 06
1
warning for inefficiently compressed datasets
Hi,
Recently added to doc/NEWS.Rd:
'R CMD check' now gives a warning rather than a note if it finds
inefficiently compressed datasets. With 'bzip2' and 'xz' compression
having been available since R 2.10.0, there is no excuse for not
using them.
Why isn't a note enough for this?
Generally speaking, warnings are for things that are dangerous,
or unsafe,
2014 May 07
0
Historical NA question (Herv? Pag?s)
"Equivalence" certainly does not mean that literally replacing some text will not change the result.
>From "R language definition", p. 11:
> Except for the syntax, there is no difference between applying an operator and calling a
function. In fact, x + y can equivalently be written ?+?(x, y). Notice that since ?+? is a nonstandard
function name, it needs to be quoted.
2017 Nov 29
2
binary form of is() contradicts its unary form
Yes, data.frame is not an S4 class but is(data.frame())
finds its super-classes anyway and without the need to wrap
it in asS4(). And "list' is one of the super-classes. Then
is(data.frame(), "list") contradicts this.
I'm not asking for a workaround. I already have one with
'class2 %in% is(object)' as reported in my original post.
'is(asS4(object), class2)'
2015 Sep 29
1
making object.size() more meaningful on environments?
Hi Gabe,
On 09/29/2015 02:51 PM, Gabriel Becker wrote:
> Herve,
>
> The problem then would be that for A a refClass whose fields take up N
> bytes (in the sense that you mean), if we do
>
> B <- A
>
> A and B would look like the BOTH take up N bytes, for a total of 2N,
> whereas AFAIK R would only be using ~ N + 2*56 bytes, right?
Yes, but that's still a *much*
2017 Nov 29
0
binary form of is() contradicts its unary form
Hi Herve,
Interesting observation with `setClass` but it is for S4. It looks
like `data.frame()` is not an S4 class.
> isS4(data.frame())
[1] FALSE
And in your case this might help:
> is(asS4(data.frame()), "list")
[1] TRUE
Looks like `is` is designed for S4 classes, I am not entirely sure.
Best,
-Mehmet
On 29 November 2017 at 20:46, Herv? Pag?s <hpages at
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
Fine with me as long as eliminating the inconveniences associated with it can be put on the roadmap. The alias instability and the fact that the user has no way to know if s/he should do ?`foo,numeric-method` or ?`foo,numeric,ANY-method` to find the method has been a long-standing problem.
H.
On 3/21/19 21:29, Michael Lawrence wrote:
If we started over, I'd try to avoid this sort of
2019 Mar 22
0
selectMethod() can fail to find methods in situations of multiple dispatch
Agreed but I'm not sure we want users accessing documentation with those
types of aliases. One option is the method?foo("numeric") syntax.
On Thu, Mar 21, 2019 at 9:52 PM Pages, Herve <hpages at fredhutch.org> wrote:
> Fine with me as long as eliminating the inconveniences associated with it
> can be put on the roadmap. The alias instability and the fact that the user
2017 May 03
2
stopifnot() does not stop at first non-TRUE argument
Not sure why the performance penalty of nonstandard evaluation would
be more of a concern here than for something like switch().
If that can't/won't be fixed, what about fixing the man page so it's
in sync with the current behavior?
Thanks,
H.
On 05/03/2017 02:26 AM, peter dalgaard wrote:
> The first line of stopifnot is
>
> n <- length(ll <- list(...))
>
>
2020 May 24
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
Herve (et al.),
On Fri, May 22, 2020 at 3:16 PM Herv? Pag?s <hpages at fredhutch.org> wrote:
> Gabe,
>
> It's the current behavior of paste() that is a major source of bugs:
>
> ## Add "rs" prefix to SNP ids and collapse them in a
> ## comma-separated string.
> collapse_snp_ids <- function(snp_ids)
> paste("rs", snp_ids,
2018 Jan 30
0
as.list method for by Objects
On 01/30/2018 02:50 PM, Michael Lawrence wrote:
> by() does not always return a list. In Gabe's example, it returns an
> integer, thus it is coerced to a list. as.list() means that it should be
> a VECSXP, not necessarily with "list" in the class attribute.
The documentation is not particularly clear about what as.list()
means for list derivatives. IMO clarifications