[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    Re: [Rd] change in behavior of <<-
From:       Thomas Lumley <tlumley () u ! washington ! edu>
Date:       2004-03-31 14:32:24
Message-ID: Pine.A41.4.58.0403310630130.79460 () homer34 ! u ! washington ! edu
[Download RAW message or body]

On Tue, 30 Mar 2004, Vincent Carey 525-2265 wrote:

>
> There has been a change to the behavior of <<-.
> See the error thrown at the bottom of the transcript
> below.  I don't believe this is an intended change.

It's an unintended side-effect of an intended change.  Since we don't use
<<- very much in base R it didn't get noticed.

	-thomas


>
> ==========
> older version of R-devel
> ==========
>
> > version
>          _
> platform i686-pc-linux-gnu
> arch     i686
> os       linux-gnu
> system   i686, linux-gnu
> status   alpha
> major    1
> minor    9.0
> year     2004
> month    03
> day      09
> language R
> > x <<- list()
> > x[["a"]] <<- list()
> > x[["a"]][["b"]] <<- 3
> > x
> $a
> $a$b
> [1] 3
>
> ===========
> more recent version of R-devel:
> ===========
>
> > version
>          _
> platform i686-pc-linux-gnu
> arch     i686
> os       linux-gnu
> system   i686, linux-gnu
> status   beta
> major    1
> minor    9.0
> year     2004
> month    03
> day      30
> language R
> > x <<- list()
> > x
> list()
> > x[["a"]] <- list()
> > x
> $a
> list()
>
> > x[["a"]] <- 2
> > x
> $a
> [1] 2
>
> > x[["a"]] <<- 2
> Error: Object "x" not found
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic