[R] tclVar Question

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Jan 10 10:43:03 CET 2003


Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> writes:

> On the other hand, if you have the name of a tclVar object as a
> character string and you want to modify the object, then the recipe
> would be something along the lines of
> 
> eval(substitute(tclvalue(foo) <- 5, list(foo=as.name("x.var"))))

...or -- doh! -- noting that tclVar objects are *references* to Tcl
variables, 

z <- get("x.var")
tclvalue(z) <- 5

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




More information about the R-help mailing list