Displaying 5 results from an estimated 5 matches for "do_subassigne".
Did you mean:
do_subassign
2019 Feb 27
2
Intermittent crashes with inset `[<-` command
Valgrind (without gctorture) reports memory misuse:
% R --debugger=valgrind --debugger-args="--leak-check=full --num-callers=18"
...
> x <- 1:200000
> y <- rep(letters[1:5], length(x) / 5L)
> for (i in 1:1000) {
+ # x[y == 'a'] <- x[y == 'b']
+ x <- `[<-`(x, y == 'a', x[y == 'b'])
+ cat(i, '')
+ }
1 2 3 4 5 6 7 8 9 10
2019 Feb 27
0
Intermittent crashes with inset `[<-` command
On an azure centos VM, I can reproduce this bug which reports either:
*** caught segfault ***
address 0x70000006a, cause 'memory not mapped' (crash)
Or
incompatible types (from builtin to integer) in subassignment type fix
(no crash)
Like Gabriel, I could not reproduce the bug on a mac laptop. Both R
versions 3.5.1.
Travers
On Wed, Feb 27, 2019 at 9:08 AM William Dunlap via R-devel
2019 Feb 26
8
Intermittent crashes with inset `[<-` command
The following code crashes after about 300 iterations on my?x86_64-w64-mingw32?machine on R 3.5.2 --vanilla.??
Others have duplicated this (see?https://github.com/tidyverse/magrittr/issues/190?if necessary), but I don't know how machine/OS-dependent it may be.??
If it doesn't crash for you, please try increasing the length of the x vector.
Substituting the commented-out line for the one
1999 Mar 02
0
[R] zero-offset matrices (PR#132)
...ix...
To tickle the bug:
"[<-.zoffset" <- function(x, i, j, value)
{
if(!missing(i) && is.numeric(i)) i <- i+1
if(!missing(j) && is.numeric(j)) j <- j+1
NextMethod("[<-")
}
m<-matrix(1:4,2,2)
m[0,]<-4:5
Probably, set a breakpoint in do_subassigne and step through it.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-...
2002 Aug 13
1
Q: replacing elements in an array
Dear all,
I have a question about the way the replacement of elements in an array
works in R (having a slight idea of the answer), and a question about
the way to achieve my goals.
If I have a 3 ways-array called 'a', the command
a[1, , ] <- rnorm(10) # assumes the size matches
will result in having the whole object 'a' copied (since arrays are
just 'vectors with