From h.wickham at gmail.com  Fri May 30 16:06:35 2014
From: h.wickham at gmail.com (Hadley Wickham)
Date: Fri, 30 May 2014 09:06:35 -0500
Subject: [Rd] Style question
In-Reply-To: <538654A4.60402@fhcrc.org>
References: <CAOVYLHcgBqBmFMhSnx3hRELV4D9ijdHRoG=SmnRx8g=6f90F3A@mail.gmail.com>
	<538654A4.60402@fhcrc.org>
Message-ID: <CABdHhvHP7VRmU6Z68EDieEPOsyqUkFRrkuG=ohO0f8V5J0tWUw@mail.gmail.com>

> Even more important than choosing between whatever(...)
> or foo::whatever(...), you should import that function
> from the foo package by putting
>
>   importFrom(foo, whatever)
>
> or
>
>   import(foo)
>
> in your NAMESPACE file.
>
> The 1st form also kind of document what function comes from what
> package.
>
> Note that you'll also need to have foo in the Depends or Imports field
> of your DESCRIPTION file. Which field is appropriate depends on whether
> or not you want foo to show up in the user's search path when s/he loads
> your package with 'library(yourpackage)'.

Except that if you do foo::whatever() you don't need to explicitly
import the function.

Hadley


-- 
http://had.co.nz/



[Rd] Style question
Hadley Wickham