On Feb 27, 2013, at 12:54 AM, Hervé Pagès wrote:
> On 02/26/2013 05:28 PM, Simon Urbanek wrote:
>>
>> On Feb 26, 2013, at 6:48 PM, Hervé Pagès wrote:
>>
>>> On 02/26/2013 03:12 PM, Simon Urbanek wrote:
On Feb 26, 2013, at 5:47 PM, Hervé Pagès wrote:
> Hi,
>
> So MA
On 02/26/2013 05:28 PM, Simon Urbanek wrote:
On Feb 26, 2013, at 6:48 PM, Hervé Pagès wrote:
On 02/26/2013 03:12 PM, Simon Urbanek wrote:
On Feb 26, 2013, at 5:47 PM, Hervé Pagès wrote:
Hi,
So MASS::huber(1:10) seems to do the job i.e. (1) loads the MASS
package (if it's installed), (2) d
On Feb 26, 2013, at 6:48 PM, Hervé Pagès wrote:
> On 02/26/2013 03:12 PM, Simon Urbanek wrote:
>>
>> On Feb 26, 2013, at 5:47 PM, Hervé Pagès wrote:
>>
>>> Hi,
>>>
>>> So MASS::huber(1:10) seems to do the job i.e. (1) loads the MASS
>>> package (if it's installed), (2) does not pollute the sea
On 02/26/2013 03:12 PM, Simon Urbanek wrote:
On Feb 26, 2013, at 5:47 PM, Hervé Pagès wrote:
Hi,
So MASS::huber(1:10) seems to do the job i.e. (1) loads the MASS
package (if it's installed), (2) does not pollute the search path,
(3) no 'R CMD check' warning if MASS is listed in Suggests,
and
On Feb 26, 2013, at 5:47 PM, Hervé Pagès wrote:
> Hi,
>
> So MASS::huber(1:10) seems to do the job i.e. (1) loads the MASS
> package (if it's installed), (2) does not pollute the search path,
> (3) no 'R CMD check' warning if MASS is listed in Suggests,
> and (4) descent error message if MASS is
Hi,
So MASS::huber(1:10) seems to do the job i.e. (1) loads the MASS
package (if it's installed), (2) does not pollute the search path,
(3) no 'R CMD check' warning if MASS is listed in Suggests,
and (4) descent error message if MASS is not installed:
> MASS::huber(1:10)
Error in loadNamespa
Le lundi 25 février 2013 à 12:59 -0800, Davor Cubranic a écrit :
> I haven't gotten any complaints from "R CMD check" when I used Simon's
> suggestion, even with "--as-cran" flag. Hadley's suggestion to use
> 'require' also works, and its side-effect of attaching the other
> package can in some app
I don't see any warnings if MASS is listed in Suggests in the DESCRIPTION.
Davor
On 2013-02-25, at 1:28 PM, Hadley Wickham wrote:
>> To summarize, it appears that the only way to call functions from a
>> suggested package is by using either 'require' (which will dynamically
>> attach it) or the
> loadNamespaces loads but does not attach the package. Suggests: is enough to
> quieten the warning with
>
> ~/tmp$ R --version
> R Under development (unstable) (2013-02-21 r62017) -- "Unsuffered
> Consequences"
>
> This is consistent with RShowDoc("R-exts") section 1.1.1
>
> Namespaces accessed
On 02/25/2013 01:28 PM, Hadley Wickham wrote:
To summarize, it appears that the only way to call functions from a
suggested package is by using either 'require' (which will dynamically
attach it) or the double colon method. Is this something that should be
mentioned in R-exts?
Except the double
> To summarize, it appears that the only way to call functions from a
> suggested package is by using either 'require' (which will dynamically
> attach it) or the double colon method. Is this something that should be
> mentioned in R-exts?
Except the double colon method doesn't work (i.e. does not
I haven't gotten any complaints from "R CMD check" when I used Simon's
suggestion, even with "--as-cran" flag. Hadley's suggestion to use 'require'
also works, and its side-effect of attaching the other package can in some
applications be seen by the end user as a nice bonus, so I'll probably ha
On 2013-02-22, at 10:23 PM, Berwin A Turlach wrote:
>> On Feb 22, 2013, at 6:39 PM, David Winsemius wrote:
> [...]
>>> I've always wondered: How does lattice manage to use grid functions
>>> without putting them on the search path?
>
> Because lattice imports the grid package and has a NAMESPACE
G'day David,
On Fri, 22 Feb 2013 18:50:07 -0800
David Winsemius wrote:
> On Feb 22, 2013, at 6:39 PM, David Winsemius wrote:
[...]
> > I've always wondered: How does lattice manage to use grid functions
> > without putting them on the search path?
Because lattice imports the grid package and ha
On Friday, February 22, 2013, Simon Urbanek wrote:
>
> On Feb 22, 2013, at 9:13 PM, Hadley Wickham wrote:
>
> > Hi Davor,
> >
> > To the best of my knowledge, there's only one way to use functions
> > from a suggested package: with require:
> >
> > if (require("suggested_package")) {
> > function
On Feb 22, 2013, at 9:13 PM, Hadley Wickham wrote:
> Hi Davor,
>
> To the best of my knowledge, there's only one way to use functions
> from a suggested package: with require:
>
> if (require("suggested_package")) {
> function_from_suggested_package()
> } else {
> stop("suggested package not
david: I was slightly misleading about the usefulness of that link for your
question because it
doesn't explicitly talk about the case where base packages import packages.
But it talks about
the general case of importing so hopefully base handles importing just like
a package that would
be install
Hi David: According to the description on cran, lattice imports grid.
I don't know if you've seen it but www.obeautifulcode.com has a very nice
topic in its archives called "How R Searches and Finds Stuff" which is
relatde to your question that I found it to be really helpful. A lot of
people on
On Feb 22, 2013, at 6:39 PM, David Winsemius wrote:
>
> On Feb 22, 2013, at 6:13 PM, Hadley Wickham wrote:
>
>> Hi Davor,
>>
>> To the best of my knowledge, there's only one way to use functions
>> from a suggested package: with require:
>>
>> if (require("suggested_package")) {
>> function_f
On Feb 22, 2013, at 6:13 PM, Hadley Wickham wrote:
> Hi Davor,
>
> To the best of my knowledge, there's only one way to use functions
> from a suggested package: with require:
>
> if (require("suggested_package")) {
> function_from_suggested_package()
> } else {
> stop("suggested package not
Hi Davor,
To the best of my knowledge, there's only one way to use functions
from a suggested package: with require:
if (require("suggested_package")) {
function_from_suggested_package()
} else {
stop("suggested package not installed")
}
Unfortunately I don't think there's any way to use a s
If in my package "Foo" I call a function from another package "Bar" if it's
available, according to R-exts, this sounds like I should include "Suggests:
Bar" in package Foo's description. But the manual is silent on how to treat
Bar's namespace. Should I import it? If so, should this be conditio
22 matches
Mail list logo