[Rd] Assignment in environment
pdalgd at gmail.com
Sun Feb 7 15:15:38 CET 2016
> On 07 Feb 2016, at 14:46 , Duncan Murdoch <murdoch.duncan at gmail.com> wrot8[e:
> but in fact, this doesn't work:
> getValue(fn)[] <- 3
> Error in getValue(fn)[] <- 3 : could not find function "getValue"
> I suspect this is a parser problem.
The canonical semantics are that
foo(x)[[....]] <- bar
is internally converted to
*tmp* <- foo(x)
*tmp*[[....]] <- bar
x <- `foo<-`(x, *tmp*)
so both foo() and `foo<-` are required.
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-devel