Skip to content
Prev 31140 / 398506 Next

R TclTk Examples

many thanks for this contribution, perhaps
i add in near future some snippets with your starting points!

..here is one simple, but nice for anybody works often with spss-data.
regards,christian


getfile <- function()  {
    name <- tclvalue(tkgetOpenFile(filetypes="{{SPSS Files} {.sav}} {{All
files} *}"))
    if (name=="") return;
    zz <- read.spss(name,use.value.label=T,to.data.frame=T)
    assign("myData",zz,envir=.GlobalEnv)
}
tt <- tktoplevel()
button.widget <- tkbutton(tt,text="Select SPSS File",command=getfile)
tkpack(button.widget)