You just need to specify the environment you want to load it into (as the
second argument to load()).

So maybe .GlobalEnv..

On Tue, May 20, 2008 at 11:22 PM, <[EMAIL PROTECTED]> wrote:

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

        [[alternative HTML version deleted]]

_______________________________________________
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