[R] need help for eval()
Laurent Gautier
laurent at cbs.dtu.dk
Sat Sep 21 17:55:25 CEST 2002
On Sat, Sep 21, 2002 at 01:48:56PM +0200, demolombe wrote:
> Hello,
>
> I need help, after hours trying to do it myself,
> to do the following:
>
> I have an object, named, say, F1 from a class "fichier" that I buildt.
> this F1 has a slot named datas ,which is a vector, so I can access to
> : F1 at datas[1], F1 at datas[2], ...
>
> Now I have a string s="F1 at datas[1]" and need to retreive the real
> content of F1 at datas[1] using s.
>
> Is there a way to do this, as it is in Matlab?
I do not know luch of MATLAB, but the following should do it:
get(s)
Hopin' it helps
L.
>
> Thanks you for any help
> Vincent
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
--------------------------------------------------------------
Laurent Gautier CBS, Building 208, DTU
PhD. Student DK-2800 Lyngby,Denmark
tel: +45 45 25 24 89 http://www.cbs.dtu.dk/laurent
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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