[Rd] Problem calling $ inside a $ method

Seth Falcon sfalcon at fhcrc.org
Tue May 8 16:42:10 CEST 2007


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> In x$name, 'name' is supposed to be a symbol, unevaluated, or a
> literal character string (but not a character vector).
>
>> f <- list(bob=1, alice=2)
>> `$`(f, "bob")
> [1] 1
>> nm <- "bob"
>> `$`(f, nm)
> NULL

Thanks, this is the piece I was missing.

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the R-devel mailing list