Displaying 1 result from an estimated 1 matches for "call__".
Did you mean:
call_r
2014 Jun 23
1
Curious behavior of $ and lapply
There seems to be a funny interaction between lapply and "$" -- also, "$"
doesn't signal an error in some cases where "[[" does.
The $ operator accepts a string second argument in functional form:
> `$`(list(a=3,b=4),"b")
[1] 4
lapply(list(list(a=3,b=4)),function(x) `$`(x,"b"))
[[1]]
[1] 4
... but using an lapply "..."