[R] evaluating the contents of a string

David A Richmond richmond at saintmarys.edu
Fri Sep 28 23:23:31 CEST 2001


Hi,
suppose I do: 
	b <- matrix(1:9,3,3)
	bname <- "b"

now
	dim(b) 
returns
	[1] 3 3

and    
	dim(bname)
returns
	NULL

is there a function to pass bname to such that dim returns the dimensions
of b?

like 
	dim(somefunc(bname))
returns
	[1] 3 3 

does 'somefunc' exist?


daver

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|David Richmond                It works on a          |      
+ Dept. of Sociology          complex scientific      + 
|Saint Mary's College          principle, known as    |  
+ Notre Dame, IN 46556               "pot luck."      +
|219-284-4517                    - The Doctor         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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