[Rd] help files for load and related functions

Duncan Murdoch murdoch at stats.uwo.ca
Mon Dec 17 15:03:55 CET 2007


On 12/17/2007 6:00 AM, Patrick Burns wrote:
> I recently had a discussion with a user about loading
> and attaching in R.  I was surprised that the help files
> don't  provide a very clear picture.
> 
>  From my point of view 'load' and 'attach' are very
> similar operations, the difference being that 'attach'
> creates a new database on the search list while 'load'
> puts all the objects into the global environment.
> 
> The help file for 'load' is inexplicit that this is what
> happens.  The 'load' and 'attach' help files neither refer
> to the other in their See Also.
> 
> Furthermore, the 'library' help file talks about "loading"
> packages.  I would suggest that it should use "attaching"
> as that is the analogous operation.
> 
> None of these three help files (nor that of 'save') has a
> Side Effects section.  Personally I think that all help files
> should have a Side Effects section (to make it clear to
> new users what side effects are and that they are not a
> good thing for most functions to have).  I can understand
> there could be another point of view on that.  However, I
> definitely think that there should be a Side Effects section
> in the help files of functions whose whole point is a side
> effect.

I think you make good points.  Care to submit patches?  The source for 
those man pages are in

https://svn.R-project.org/R/trunk/src/library/base/man/attach.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/library.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/load.Rd

https://svn.R-project.org/R/trunk/src/library/base/man/save.Rd

If you send them to me before Thursday or after Jan 2, I'll take a look. 
  (If you send them to me during the Xmas break there's a good chance 
they'll get lost.)

Duncan Murdoch



More information about the R-devel mailing list