[R] can I call user-created functions without source() ?

Michael H. Prager Mike.Prager at noaa.gov
Mon Jun 19 22:06:32 CEST 2006


on 6/19/2006 1:32 PM Spencer Graves said the following:
>       I'd like to echo Duncan's comment about creating 'man' pages for 
> functions.  I find myself writing man pages for functions I may never 
> include in an R package, just because it helps me think through what 
> I'm trying to do.  I think I get better code faster.  It's like 
> preparing a map before starting on a journey through unknown 
> territory:  I may think I know the destination and more or less every 
> step of the way.  However, if it's very far, it helps to make a plan 
> first;  then when I encounter something I hadn't anticipated, it makes 
> it much easier to figure out what to do without sabotaging something else.

Yes, I agree on the value of planning and documentation.  I hope this 
year to have the time to learn the package-generation system, which on 
first impression seems a bit trickier on Windows than on Unix etc. 

Last but not least, thanks for the tips on load() vs. attach().

...Mike

-- 
Michael Prager, Ph.D.
Southeast Fisheries Science Center
NOAA Center for Coastal Fisheries and Habitat Research
Beaufort, North Carolina  28516
** Opinions expressed are personal, not official.  No
** official endorsement of any product is made or implied.



More information about the R-help mailing list