Re: [Rd] Submit a package which use doParallel

2015-03-05 Thread Henrik Bengtsson
On Mar 5, 2015 5:01 PM, "Etienne Lord" wrote: > > Thanks for the quick reply. > > Adding all the dependencies of doParallel (foreach, parallel, iterators) in > the DESCRIPTION and in import statements in NAMESPACE resolved the > build_win problems. Don't know why this is required for Windows build

Re: [Rd] Submit a package which use doParallel

2015-03-05 Thread Etienne Lord
Thanks for the quick reply. Adding all the dependencies of doParallel (foreach, parallel, iterators) in the DESCRIPTION and in import statements in NAMESPACE resolved the build_win problems. Don't know why this is required for Windows build. Thanks again. 2015-03-05 18:22 GMT-05:00 Duncan Murdoc

Re: [Rd] Submit a package which use doParallel

2015-03-05 Thread Duncan Murdoch
On 05/03/2015 6:03 PM, Etienne Lord wrote: > Hi, > > I'm trying to submit my first package which depends on doParallel: > > Depends: R (>= 3.0), igraph, doParallel It's much better to import what you need. If someone calls one of your functions using :: notation, it will fail, because it won't

Re: [Rd] Submit a package which use doParallel

2015-03-05 Thread Duncan Murdoch
On 05/03/2015 6:16 PM, Brian G. Peterson wrote: > On Thu, 2015-03-05 at 18:03 -0500, Etienne Lord wrote: >> Hi, >> >> I'm trying to submit my first package which depends on doParallel: >> >> Depends: R (>= 3.0), igraph, doParallel > > add foreach to your Depends. That should resolve the error you

Re: [Rd] Submit a package which use doParallel

2015-03-05 Thread Brian G. Peterson
On Thu, 2015-03-05 at 18:03 -0500, Etienne Lord wrote: > Hi, > > I'm trying to submit my first package which depends on doParallel: > > Depends: R (>= 3.0), igraph, doParallel add foreach to your Depends. That should resolve the error you're seeing. > Running hadley devtools: devtools::check(

[Rd] Submit a package which use doParallel

2015-03-05 Thread Etienne Lord
Hi, I'm trying to submit my first package which depends on doParallel: Depends: R (>= 3.0), igraph, doParallel Running hadley devtools: devtools::check() and devtools::release() result in no problem (no ERROR nor NOTE on Linux, Mac and Windows). However, when in use the devtools::build_win() co

Re: [Rd] Performance issue in stats:::weighted.mean.default method

2015-03-05 Thread Tadeáš Palusga
Oops, such an amateur mistake. Thanks a lot for your quick response. Regards TP On 03/05/2015 06:49 PM, Prof Brian Ripley wrote: On 05/03/2015 14:55, Tadeáš Palusga wrote: Hi, I'm using this mailing list for the first time and I hope this is the right one. I don't think that the following

Re: [Rd] Performance issue in stats:::weighted.mean.default method

2015-03-05 Thread Henrik Bengtsson
See weightedMean() in the matrixStats package. It's optimized for data type, speed and memory and implemented in native code so it can avoid some of these intermediate copies. It's a few times faster than weighted.mean[.default](); library(matrixStats) library(microbenchmark) n <- 5000 x <- samp

Re: [Rd] Performance issue in stats:::weighted.mean.default method

2015-03-05 Thread Prof Brian Ripley
On 05/03/2015 14:55, Tadeáš Palusga wrote: Hi, I'm using this mailing list for the first time and I hope this is the right one. I don't think that the following is a bug but it can be a performance issue. By my opinion, there is no need to filter by [w != 0] in last sum of weighted.mean.d

[Rd] Performance issue in stats:::weighted.mean.default method

2015-03-05 Thread Tadeáš Palusga
Hi, I'm using this mailing list for the first time and I hope this is the right one. I don't think that the following is a bug but it can be a performance issue. By my opinion, there is no need to filter by [w != 0] in last sum of weighted.mean.default method defined in src/library/stat