Skip to content

how to use the function from another package

1 message · Tuszynski, Jaroslaw W.

#
load the library in my code after I add a "depends" field in the DESCRIPTION
file? 

No, 

First when user of your package downloads it (at least on Windows machines)
all required packages are also downloaded (this mechanism sometimes needs
manual help, but that is another story). Then when he loads your package (by
calling library(YourPackage)) all required packages are loaded into R.

One good way to research this kind of questions (other than documentation
and R-Help) is to study source code of other people packages.
   
Jarek
====================================================\=======

 Jarek Tuszynski, PhD.                           o / \ 
 Science Applications International Corporation  <\__,|  
 (703) 676-4192                                   ">   \
 Jaroslaw.W.Tuszynski at saic.com                     `    \


-----Original Message-----
From: peterwyang at gmail.com [mailto:peterwyang at gmail.com] 
Sent: Tuesday, August 09, 2005 2:57 PM
To: Tuszynski, Jaroslaw W.
Subject: Re: [R] how to use the function from another package

Thanks very much for your help. Do I still have to write library( ) to load
the library in my code after I add a "depends" field in the DESCRIPTION
file? Thanks.

Peter
On 8/9/05, Tuszynski, Jaroslaw W. <JAROSLAW.W.TUSZYNSKI at saic.com> wrote:
help.