Working with data frames
Next: Attaching arbitrary lists
Up: Data frames
Previous: attach() and detach()
A useful convention that allows you to work with many different problems
comfortably together in the same working directory is
- gather together all variables for any well defined and separate
problem in a data frame under a suitably informative name;
- when working with a problem attach the appropriate data frame at
position 2, and use the working directory at level 1 for operational
quantities and temporary variables;
- before leaving a problem, add any variables you wish to keep for
future reference to the data frame using the $ form of assignment,
and then detach();
- finally remove all unwanted variables from the working directory and
keep it a clean of left-over temporary variables as possible.
In this way it is quite simple to work with many problems in the same
directory, all of which have variables named x, y and z,
for example.
Erik Moledor
Tue Jan 31 21:02:18 EST 1995