I dont have any experience with Gwidgets. 

However, one alternative would be to use tcltk. 

See http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/FileOpenSave.html 

for an example. This has worked fine for me. 

Regards

Wayne


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: 21 May 2008 07:22
To: r-sig-gui@stat.math.ethz.ch
Subject: [R-gui] loading an RData File using gWidgets


Hello everyone. This is probably a very easy problem, however I wasn't
able to find any solution in the documentation and examples of gWidgets.

I want to open a file selection dialog (gfile()) and if the user selects
an .Rdata file, it should be loaded. So I wrote the following function
that is executed when someone clicks an "load RData file" button:

fOpen= function(h,...) {
    filepath <- as.character(gfile(filter = list("R files" = list(patterns
= c("*.Rdata")))))
    load(file=filepath)
}

"filepath" is the correct path to the RData file that should be loaded.
However, the file does not get loaded into the workspace. What elementary
thing am I missing here?

Thank you very much for your help in advance,
Bernhard

_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-gui

_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-gui

Reply via email to