From |uke-t|erney @end|ng |rom u|ow@@edu  Wed Feb 27 22:29:51 2019
From: |uke-t|erney @end|ng |rom u|ow@@edu (Tierney, Luke)
Date: Wed, 27 Feb 2019 21:29:51 +0000
Subject: [Rd] Intermittent crashes with inset `[<-` command
In-Reply-To: <alpine.DEB.2.21.1902271439150.4951@luke-Latitude-7480>
References: <1345861204.5109355.1551154699341.ref@mail.yahoo.com>
 <1345861204.5109355.1551154699341@mail.yahoo.com>
 <alpine.DEB.2.21.1902271439150.4951@luke-Latitude-7480>
Message-ID: <alpine.DEB.2.21.1902271529290.4951@luke-Latitude-7480>

Fixed in R-devel and R-patched.

Best,

luke

On Wed, 27 Feb 2019, Tierney, Luke wrote:

> Thanks for the report. Should be fixed shortly.
>
> Best,
>
> luke
>
> On Tue, 26 Feb 2019, Brian Montgomery via R-devel wrote:
>
>> 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 below it works correctly (prints out 1:1000 and ends normally) every time.
>>
>> 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, '')
>> }
>> cat('\n')
>>
>> The point of using this syntax is to make it work better with pipes, but the errors occur without pipes or magrittr.
>>
>> Thank you for your help!
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
>

-- 
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


[Rd] Intermittent crashes with inset `[<-` command
Tierney, Luke