[R] calling a list element from a list name passed to a function

Gonçalo Ferraz gferraz29 at gmail.com
Sun Jan 27 14:42:38 CET 2008


Hi,

'true_name' is a list of numerical, matrix, and text items

I do

pass_name <- "true_name"

and pass the name of the list to a function so that the character  
class variable 'passed_name' contains the name of the list called  
'true_name'

Inside the function, how can I get a specified element from the list?  
For example, if I want to get

true_name$month

How do I get that item with the passed name?

Thank you for any help!

Gonçalo



More information about the R-help mailing list