[Rd] Strange behaviour of the [[ operator

Herve Pages hpages at fhcrc.org
Sat Sep 30 03:06:41 CEST 2006


Hi,

This looks like a bug:

    > a <- list(b=5)
    > a[['b']]
    [1] 5
    > a[[t<-'b']]

Nothing gets printed!

I need to use parenthesis to see the expected result:

    > a[[(t<-'b')]]
    [1] 5


Cheers,
H.




More information about the R-devel mailing list