search for: tclvar

Displaying 20 results from an estimated 78 matches for "tclvar".

2010 Aug 11
0
R and TK Error "can't find objects"
Dear R People, I?m trying to link R and TK. I?m using R 2.11.1 with Tinn-R 1.17.2.4. For simple examples like the following one it?s working (see the initiation of the variables, the handler and the link to the function which multiply Zahl, Exponent and Factor) : require(tcltk) Ergebnis<-tclVar(c(0,0,0,0,0,0)) Zahl<-tclVar(c(0,0,1,1,1,0)) Exponent<-tclVar(c(1,1,1,1,1,1)) Factor<-tclVar(2) handler.Quadrieren<-function() { tkconfigure(e, textvariable=tclVar(test2(as.numeric(tclObj(Zahl)),as.numeric(tclObj(Exp onent)),as.numeric(tclvalue(Faktor))))) } test2 <- local({sourc...
2010 Aug 05
1
Error in as.environment(pos): using 'as.environment(NULL)' is defunct
Hello, I?m using R 2.11.1 with Tinn-R 1.17.2.4. I hope the given informations are enough (it?s my first entry here) The as.environment(pos) error appears in using the following code which should open a function in an other R-file. Here some extractions of the code: .... HZ<-tclVar(seq(length=a,from=1,by=0)) #(a is defined by a tkentry-element) VZ<-tclVar(seq(length=a,from=1,by=0)) Aktivit?t<-tclVar(seq(length=a,from=1,by=0)) VKG<-tclVar(3) Zugeh?rigkeit is a matrix. #The values can be changed by a tkentry-element. handler.Berechnung<-function() {...
2012 Aug 29
1
Problem Installing a Package
.../include -fpic -g -O2 -c ntr.c -o ntr.o gcc -std=gnu99 -shared -L/usr/local/lib64 -o TIMP.so ntr.o - L/usr/local/lib64/R/lib -lR installing to /home/computation/R/x86_64-unknown-linux-gnu- library/2.15/TIMP/libs ** R ** data ** inst ** preparing package for lazy loading Warning: S3 methods ?$.tclvar?, ?$<-.tclvar?, ?as.character.tclObj?, ?as.character.tclVar?, ?as.double.tclObj?, ?as.integer.tclObj?, ?as.logical.tclObj?, ?as.raw.tclObj?, ?print.tclObj?, ?[[.tclArray?, ?[[<-.tclArray?, ?$.tclArray?, ?$<-.tclArray?, ?names.tclArray?, ?names<-.tclArray?, ?length.tclArray?, ?length...
2004 Jun 30
1
help with tclVar
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) Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class = "tc...
2008 Mar 24
2
as.numeric with tclvalue redux
Hi again R People: This works fine: > library(tcltk) > a <- tclVar("4.5") > as.numeric(tclvalue(a)) [1] 4.5 > #But if you have: > b <- tclVar("pi") > as.numeric(tclvalue(b)) [1] NA Warning message: NAs introduced by coercion > Is anyone aware of a way around this, please? thanks, Erin -- Erin Hodgess Associate Professor D...
2012 Aug 24
1
Error while installing gsubfn_0.6-4.tar.gz for R 2.15.1
....2 20080704 (Red Hat 4.1.2-50)) * installing to library ?/home/mapred/installables/R/library? * installing *source* package ?gsubfn? ... ** package ?gsubfn? successfully unpacked and MD5 sums checked ** R ** demo ** inst ** byte-compile and prepare package for lazy loading Warning: S3 methods ?$.tclvar?, ?$<-.tclvar?, ?as.character.tclObj?, ?as.character.tclVar?, ?as.double.tclObj?, ?as.integer.tclObj?, ?as.logical.tclObj?, ?as.raw.tclObj?, ?print.tclObj?, ?[[.tclArray?, ?[[<-.tclArray?, ?$.tclArray?, ?$<-.tclArray?, ?names.tclArray?, ?names<-.tclArray?, ?length.tclArray?, ?length<...
2001 Oct 06
1
tcltk
...e(cluster) require(mva) require(foreign) local ({ dialog.fc <- function() { tt <- tktoplevel() tkwm.title(tt,"Fuzzy-ClusterAnalysis") cdata.entry <- tkentry(tt,textvariable="cdata") k.entry <- tkentry(tt,textvariable="k") reset <- function () { tclvar$cdata <- "" tclvar$k <- "" } reset.but <- tkbutton(tt,text="Reset", command=reset) submit.but <- tkbutton(tt,text="submit",command=function()tclvar$done<-1) build <- function() { x <- parse(text=tclvar$cdata) [[1]] y &lt...
2012 Sep 24
1
eval and tcltk : target of assignment expands to non-language object
Hi everyone, I have a problem to assign a value with tcl/tk ths is the code ( it should be simple to understand) : library(tcltk) valA<-tclVar("0") valB<-tclVar("0") valC<-tclVar("0") id<-"A" out<-"1" out2<-"2" print(paste("tclvalue(val",id,")",sep="")) # ok print(as.name(paste("tclvalue(val",id,")",sep="&quot...
2000 Sep 28
0
No subject
...tt2, text="Identify Outliers") + but.wid2 <- tkbutton(tt2, text="OK", command=function() tkdestroy(tt2)) + tkpack(lab.wid2, but.wid2) + labp <- identify(xd$iv802, xd$AVGT, label=xd$FIPS) + dev.print(png, "templabs.png", width=600,height=600) + } + + tclvar$choice <- 99 + rbut.wid <- tkradiobutton(tt, text="Precipitation", value=0, + variable=tclvar$choice, + command=pptlabs) + rbut.wid2 <- tkradiobutton(tt, text="Temperature", value=1, + variable=tclvar$choice, + command=templabs) + but.wid <- tkbutton(tt, text=&q...
2005 Oct 24
1
tk problem with R 2.2.0 on wine/linux
...y) demo(tkdensity) ---- ~~~~~~~~~ Type <Return> to start : > require(tcltk) || stop("tcltk support is absent") [1] TRUE > require(graphics) [1] TRUE > require(stats) [1] TRUE > local({ y <- NULL xlim <- NULL size <- tclVar(50.000000) dist <- tclVar(1.000000) kernel <- tclVar("gaussian") bw <- tclVar(1.000000) bw.sav <- 1.000000 replot <- function(...) { if (is.null(y)) re .... [TRUNCATED] Error in structure(.External("dotTclObjv", objv,...
2008 Jul 24
0
unable to load a library
...aplpack without problems, but when i try to use it, i got errors: > library(aplpack) Loading required package: tcltk Error in namespaceExport(ns, exports) : undefined exports :addTclPath, as.tclObj, is.tclObj, is.tkwin, tclfile.dir, tclfile.tail In addition: Warning message: S3 methods '$.tclvar', '$<-.tclvar', 'as.character.tclObj', 'as.character.tclVar', 'as.double.tclObj', 'as.integer.tclObj', 'as.logical.tclObj', 'print.tclObj', '[[.tclArray', '[[<-.tclArray', '$.tclArray', '$<-.tclArray...
2010 Nov 19
1
Set colour in tcl variable
Hello all, using package tcltk this is my problem: I want to set a colour of a tclVar(). I have a tklabel (fixed in position) which should display two variables occasionally. If a constraint is fulfilled, the tklabel should display correct<-tclVar('correct') in green, otherwise it should display wrong<-tclVar('wrong') in red! To display the variables is...
2011 Dec 05
0
Problemas al cargar Rcmdr
...o fui a lanzar RCommander me surgió este error: library(Rcmdr) Loading required package: tcltk Error : .onLoad failed in loadNamespace() for 'tcltk', details: call: fun(libname, pkgname) error: Tcl/Tk support is not available on this system Además: Mensajes de aviso perdidos S3 methods ?$.tclvar?, ?$<-.tclvar?, ?as.character.tclObj?, ?as.character.tclVar?, ?as.double.tclObj?, ?as.integer.tclObj?, ?as.logical.tclObj?, ?as.raw.tclObj?, ?print.tclObj?, ?[[.tclArray?, ?[[<-.tclArray?, ?$.tclArray?, ?$<-.tclArray?, ?names.tclArray?, ?names<-.tclArray?, ?length.tclArray?, ?length...
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2000 Sep 29
1
Two tcltk questions and Re: tcltk package functionality
...t;, value="0", variable="choice") rbut.wid2 <- tkradiobutton(tt, text="x2", value="1", variable="choice") but.done <- tkbutton(tt, text="FINISHED", command=function(){ tclvar$done <- "T" tkdestroy(tt) } ) tkpack(label.widget, rbut.wid1, rbut.wid2, but.done) # wait until FINISHED is pressed tclvar$choice <- "0" tkwait.variable(&quot...
2003 Jan 10
1
tclVar Question
Hi All... In an attempt to read data from a file and feed it into a tcltk entry box, I've run into difficulties. The following hopefully describes my dilemma: tclvalue(x.var) <- 5 Works fine. tclvalue("x.var") <- 5 Does not work. [Error: Target of assignment expands to non-language object] tclvalue(eval(parse(text="x.var"))) <- 5 Also, does not work. Any
2006 Mar 07
2
Building tkentry dynamicly
..., with default text for each. As N is variable I need to construct them in an iterative way : library(tcltk) main<-tktoplevel() tktitle(main)<-"My Tool" filenames<-c("toto","tata","titi") N<-length(filenames) for (i in 1: N) { text<-tclVar(filenames[i]) # get a filename (string value) textField<-tkentry(main,textvariable=text) # build a text field tkgrid(textField) } The problem is : How to keep references for each tclVar created, in order to acces to the text modifications eventually done for each field ? Exampl...
2008 Aug 11
3
tkentry that exits after RETURN?
...s for returning/ destroying the window when the user types a carriage return/ENTER in the text window? I've messed around a little with validate, validatecommand, but don't see any obvious way to do it ... getPassword <- function(){ require(tcltk) tt <- tktoplevel() pass=tclVar("") label.widget <- tklabel(tt, text="Enter Password") password.widget <- tkentry(tt,show="*",textvariable=pass) ok <- tkbutton(tt,text="OK",default="active", command=function()tkdestroy(tt)) tkpack(label....
2006 Jul 29
1
fancier plotting
...he data but I have no clue how to inject the extra fancies. **************************************************************** ########### # ploting # ########### library(tkrplot) #just the turning points L <- length(I0); #points to plot tt <- tktoplevel() left <- tclVar(1) oldleft <- tclVar(1) right <- tclVar(L) cury <- tclVar(' ') curx <- NA tmpusr <- numeric(4) tmpplt <- numeric(4) f1 <- function(){ lleft <- as.numeric(tclvalue(left)) rright <- as.numeric(tclvalue(right)) x <- seq(lleft,rright,by=1) par(bg='blac...