Re: [Rd] Problem calling $ inside a $ method

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Tue, 08 May 2007 07:42:10 -0700

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 08 May 2007 - 14:59:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 May 2007 - 19:33:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.