[R] Parsing for list components

G. Sawitzki gs at statlab.uni-heidelberg.de
Thu Oct 18 17:35:56 CEST 2001


How do I parse an identifier of a list component, e.g.
	mylist$mycomponent
or
	mylist[[1]] ?
Parse does not do the job, e.g.
	parse(text="mylist$mycomponent")
returns an expression with just one term, instead of "mylist", "$", 
"mycomponent".

What I need is a way to extract the list name (e.g. "mylist"), given 
an identifier of a component. Splitting the string is possible, but I 
think there are better solutions.

   gs.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list