Skip to content

function that load variables

4 messages · Alaios, R. Michael Weylandt, Jeff Newmiller +1 more

#
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 <alaios at yahoo.com> wrote:
#
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 Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
"R. Michael Weylandt" <michael.weylandt at gmail.com> wrote: