[R] function that load variables

2011-11-07 Thread Alaios
Dear all, I have saved few variable names into local files, I wanted to make a function that load this files and generates the variable names into my working environment. I have tried to do that as a function but my problem isĀ  that this function does not return the variable names

Re: [R] function that load variables

2011-11-07 Thread R. Michael Weylandt
Perhaps you mean to use load(, envir = .GlobalEnv) Currently you load up the variables in the function environment but then they are thrown away when the function ends. Michael On Mon, Nov 7, 2011 at 8:40 AM, Alaios ala...@yahoo.com wrote: Dear all, I have saved few variable names into

Re: [R] function that load variables

2011-11-07 Thread Jeff Newmiller
A much better solution is to make separate functions for each object you import, and return an object from the function to be assigned in the calling environment. This will be far less confusing to read later. --- Jeff

Re: [R] function that load variables

2011-11-07 Thread Bert Gunter
1. Full disclosure. I have not followed this thread closely. My comment concerns only: On Mon, Nov 7, 2011 at 8:35 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: A much better solution is to make separate functions for each object you import, and return an object from the function to be