Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Berwin A Turlach
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Hadley Wickham
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Simon Urbanek
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Mark Leeds
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Mark Leeds
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread David Winsemius
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread David Winsemius
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

Re: [Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Hadley Wickham
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

[Rd] Recommended way to call/import functions from a Suggested package

2013-02-22 Thread Davor Cubranic
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

[Rd] Registering native routines

2013-02-22 Thread Terry Therneau
I'm working on registering all the routines in the survival package, per a request from R-core. Two questions: 1. In the coxph routine I have this type of structure: if (survival has 2 columns) routines <- c("coxfit5_a", "coxfit5_b", "coxfit5_c") else routines

Re: [Rd] limitations to random number generator in 64-bits machines

2013-02-22 Thread Mauricio Zambrano-Bigiarini
On 22/02/13 12:54, Prof Brian Ripley wrote: On 22/02/2013 11:02, Bert Gunter wrote: AFAICS, these are statistics, not R, issues, and are completely off topic here. You should post on a statistics list, such as stats.stackexchange.com, instead. Except for the unattributed vague comment about 64

Re: [Rd] limitations to random number generator in 64-bits machines

2013-02-22 Thread Prof Brian Ripley
On 22/02/2013 11:02, Bert Gunter wrote: AFAICS, these are statistics, not R, issues, and are completely off topic here. You should post on a statistics list, such as stats.stackexchange.com, instead. Except for the unattributed vague comment about 64-bit (sic) machines. The RNG is the same (an

Re: [Rd] limitations to random number generator in 64-bits machines

2013-02-22 Thread Bert Gunter
AFAICS, these are statistics, not R, issues, and are completely off topic here. You should post on a statistics list, such as stats.stackexchange.com, instead. Cheers, Bert On Thu, Feb 21, 2013 at 5:20 AM, Mauricio Zambrano-Bigiarini wrote: > Dear List, > > Recently I got the comment that the im