[R] evaluating the contents of a string
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Fri Sep 28 23:47:03 CEST 2001
David A Richmond <richmond at saintmarys.edu> writes:
> 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?
get()
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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