[R-gui] loading an RData File using gWidgets

bernhard at jabberoo.net bernhard at jabberoo.net
Wed May 21 08:22:23 CEST 2008


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



More information about the R-SIG-GUI mailing list