[Rd] Correct use of Depends, Imports and ::

From: Mauricio Zambrano-Bigiarini <mauricio.zambrano_at_jrc.ec.europa.eu>
Date: Wed, 07 Nov 2012 10:04:11 +0100

Dear R developers,

Taking advantage of the yesterday discussion about the use of Depends/Import/Suggests/Enhances, I would like to add a related question.

Let's assume, in the DESCRIPTION file of my package foo0, I have:

Depends: foo1
Imports: foo2

while in the NAMESPACE file of my package I have

importFrom("foo2", f2)

and within my package I use the following two external functions:

f1, from package foo1
f2, from package foo2

If I want to use the two previous functions within a function of my package foo0, is it correct to call them as follow ( assuming 'x' is the only argument of 'f1' and 'f2'):


OR should I use





something else (the correct way of doing it in R) ?

Finally, can I use the following call in the body of a function of my package foo0:


without declaring the package 'foo3' in the Imports section of my DESCRIPTION file ?

Thanks in advance for your help,

Mauricio Zambrano-Bigiarini


Water Resources Unit Institute for Environment and Sustainability (IES) Joint Research Centre (JRC), European Commission TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT webinfo :
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:11}} ______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 07 Nov 2012 - 09:09:35 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 07 Nov 2012 - 14:50:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive