[R] tcltk

C. Schulz ozric at web.de
Sat Oct 6 19:21:40 CEST 2001


HI,
(1) ...thanks for the last comments to tcltk & Win2000.
(2) - i'm newbie in tcl/tk but would like learn fast and develop
(learning by doing) a tcl/tk clusterAnalysis application which combine
some clusterMethods from different Rpackages.

i use the tkttest.R example as "reference" and become not finished for
my "first" step????
(3) how is it possible that the code from the tkttest.R example would
be execute and not only print to the screen; 
(4) Have somebody further "small" Rtcltk statistical sourceCode example's as
a further startingPoint for me ?

thanks for advance &
regards,christian



require (tcltk) || stop("tcltk support is absent")
require(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 <- parse(text=tclvar$k)	[[1]]
  result <- substitute(fanny(x,y))
}

tkgrid(tklabel(tt,text="Fuzzy-Cluster"),columnspan=4)
tkgrid(tklabel(tt,text="data"),cdata.entry)
tkgrid(tklabel(tt,text="numberOfCluster"),k.entry)
tkgrid(submit.but, reset.but)

 tkbind(tt, "<Destroy>", function()tclvar$done<-2)
 tkwait.variable("done")
if(tclvar$done=="2") stop("aborted")
tkdestroy(tt)
cmd <- build()
cat("### Command executed via Tk ###\n")
cat(deparse(build()),sep="\n")
cat("### -----\n")
eval (cmd)
}
tclvar$cdata <- read.spss("c:/Rdata/ordCluVars.sav")
tclvar$k <- "5"
dialog.fc()
}
)









_______________________________________________________________________




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