Re: [R] help with tclVar

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Thu 01 Jul 2004 - 17:50:27 EST

solares@unsl.edu.ar wrote:

> Hi, I can' t load a variable tcltk declared with tclVar, why is this?, the
> exmple above explain me ,Thanks Ruben
> a<-tclVar(init="")
>

>>f<-function(){

>
> + a<<-"pipo"
> + }
>
>>f()
>>a

>
> [1] "pipo"
>

>>tclvalue(a)

He? You have initialized "a" correctly at the beginning, but overwritten by a character vector. Now it is no longer of class "tclVar", so what do you expect?

I guess you are going to use something like

  tclvalue(a) <- "pipo"
  tclvalue(a)

Uwe Ligges

> Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class =
> "tclObj") :
> [tcl] can't read "pipo": no such variable.



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 01 17:55:56 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:38 EST