On Fri, Oct 11, 2019 at 3:55 PM Morgan Morgan <morgan.emailbox at gmail.com> wrote:> How do you prove usefulness of a feature? > Do you have an example of a feature that has been added after proving to be > useful in the package space first? > > Thank you, > Morgan >The parallel package (a base package like utils, stats, ...) was added as a drop-in replacement of the packages snow and multicore for parallel computing. That's one example, but sure there's more. Kind regards Joris -- Joris Meys Statistical consultant Department of Data Analysis and Mathematical Modelling Ghent University Coupure Links 653, B-9000 Gent (Belgium) <https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g> ----------- Biowiskundedagen 2018-2019 http://www.biowiskundedagen.ugent.be/ ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
It?s rather difficult. For example, the base R Kendall tau is written with the naive O(n^2). The much faster O(n log n) implementation was programmed and is in the pcaPP package. When I say much faster, I mean that my implementation in Excel VBA was faster than R for 10,000 or so pairs. R-Core decided not to implement that code, and instead made a note about the faster implementation living in pcaPP in the help for ?cor?. See [1] for the 2012 discussion. My point is it?s really really difficult to get something in Base R. Develop it well, put it in a package, and you have basically the same result. Avi [1] https://stat.ethz.ch/pipermail/r-devel/2012-June/064351.html On Fri, Oct 11, 2019 at 9:55 AM Morgan Morgan <morgan.emailbox at gmail.com> wrote:> How do you prove usefulness of a feature? > Do you have an example of a feature that has been added after proving to be > useful in the package space first? > > Thank you, > Morgan > > On Fri, 11 Oct 2019 13:53 Michael Lawrence, <lawrence.michael at gene.com> > wrote: > > > Thanks for this interesting suggestion, Morgan. While there is no strict > > criteria for base R inclusion, one criterion relevant in this case is > that > > the usefulness of a feature be proven in the package space first. > > > > Michael > > > > > > On Fri, Oct 11, 2019 at 5:19 AM Morgan Morgan <morgan.emailbox at gmail.com > > > > wrote: > > > >> On Fri, 11 Oct 2019 10:45 Duncan Murdoch, <murdoch.duncan at gmail.com> > >> wrote: > >> > >> > On 11/10/2019 6:44 a.m., Morgan Morgan wrote: > >> > > Hi All, > >> > > > >> > > I was looking for a function to find a small matrix inside a larger > >> > matrix > >> > > in R similar to the one described in the following link: > >> > > > >> > > > >> > > >> > https://www.mathworks.com/matlabcentral/answers/194708-index-a-small-matrix-in-a-larger-matrix > >> > > > >> > > I couldn't find anything. > >> > > > >> > > The above function can be seen as a "generalisation" of the "which" > >> > > function as well as the function described in the following post: > >> > > > >> > > > >> > > >> > https://coolbutuseless.github.io/2018/04/03/finding-a-length-n-needle-in-a-haystack/ > >> > > > >> > > Would be possible to add such a function to base R? > >> > > > >> > > I am happy to work with someone from the R core team (if you wish) > and > >> > > suggest an implementation in C. > >> > > >> > That seems like it would sometimes be a useful function, and maybe > >> > someone will point out a package that already contains it. But if > not, > >> > why would it belong in base R? > >> > > >> > >> If someone already implemented it, that would great indeed. I think it > is > >> a > >> very general and basic function, hence base R could be a good place for > >> it? > >> > >> But this is probably not a good reason; maybe someone from the R core > team > >> can shed some light on how they decide whether or not to include a > >> function > >> in base R? > >> > >> > >> > Duncan Murdoch > >> > > >> > >> [[alternative HTML version deleted]] > >> > >> ______________________________________________ > >> R-devel at r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-devel > >> > > > > > > -- > > Michael Lawrence > > Scientist, Bioinformatics and Computational Biology > > Genentech, A Member of the Roche Group > > Office +1 (650) 225-7760 > > michafla at gene.com > > > > Join Genentech on LinkedIn | Twitter | Facebook | Instagram | YouTube > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Sent from Gmail Mobile [[alternative HTML version deleted]]
How do you prove usefulness of a feature? Do you have an example of a feature that has been added after proving to be useful in the package space first? Thank you, Morgan On Fri, 11 Oct 2019 13:53 Michael Lawrence, <lawrence.michael at gene.com> wrote:> Thanks for this interesting suggestion, Morgan. While there is no strict > criteria for base R inclusion, one criterion relevant in this case is that > the usefulness of a feature be proven in the package space first. > > Michael > > > On Fri, Oct 11, 2019 at 5:19 AM Morgan Morgan <morgan.emailbox at gmail.com> > wrote: > >> On Fri, 11 Oct 2019 10:45 Duncan Murdoch, <murdoch.duncan at gmail.com> >> wrote: >> >> > On 11/10/2019 6:44 a.m., Morgan Morgan wrote: >> > > Hi All, >> > > >> > > I was looking for a function to find a small matrix inside a larger >> > matrix >> > > in R similar to the one described in the following link: >> > > >> > > >> > >> https://www.mathworks.com/matlabcentral/answers/194708-index-a-small-matrix-in-a-larger-matrix >> > > >> > > I couldn't find anything. >> > > >> > > The above function can be seen as a "generalisation" of the "which" >> > > function as well as the function described in the following post: >> > > >> > > >> > >> https://coolbutuseless.github.io/2018/04/03/finding-a-length-n-needle-in-a-haystack/ >> > > >> > > Would be possible to add such a function to base R? >> > > >> > > I am happy to work with someone from the R core team (if you wish) and >> > > suggest an implementation in C. >> > >> > That seems like it would sometimes be a useful function, and maybe >> > someone will point out a package that already contains it. But if not, >> > why would it belong in base R? >> > >> >> If someone already implemented it, that would great indeed. I think it is >> a >> very general and basic function, hence base R could be a good place for >> it? >> >> But this is probably not a good reason; maybe someone from the R core team >> can shed some light on how they decide whether or not to include a >> function >> in base R? >> >> >> > Duncan Murdoch >> > >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > > -- > Michael Lawrence > Scientist, Bioinformatics and Computational Biology > Genentech, A Member of the Roche Group > Office +1 (650) 225-7760 > michafla at gene.com > > Join Genentech on LinkedIn | Twitter | Facebook | Instagram | YouTube >[[alternative HTML version deleted]]
I think you are confusing package and function here. Plus some of the R Core packages, that you mention, contain functions that should probably be replaced by functions with better implementation from packages on CRAN. Best regards Morgan On Fri, 11 Oct 2019 15:22 Joris Meys, <jorismeys at gmail.com> wrote:> > > On Fri, Oct 11, 2019 at 3:55 PM Morgan Morgan <morgan.emailbox at gmail.com> > wrote: > >> How do you prove usefulness of a feature? >> Do you have an example of a feature that has been added after proving to >> be >> useful in the package space first? >> >> Thank you, >> Morgan >> > > The parallel package (a base package like utils, stats, ...) was added as > a drop-in replacement of the packages snow and multicore for parallel > computing. That's one example, but sure there's more. > > Kind regards > Joris > > -- > Joris Meys > Statistical consultant > > Department of Data Analysis and Mathematical Modelling > Ghent University > Coupure Links 653, B-9000 Gent (Belgium) > > <https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g> > > ----------- > Biowiskundedagen 2018-2019 > http://www.biowiskundedagen.ugent.be/ > > ------------------------------- > Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php >[[alternative HTML version deleted]]
Your answer makes much more sense to me. I will probably end up adding the function to a package. Some processes and decisions on how R is developed seems to be obscure to me. Thank you Morgan On Fri, 11 Oct 2019 15:30 Avraham Adler, <avraham.adler at gmail.com> wrote:> It?s rather difficult. For example, the base R Kendall tau is written with > the naive O(n^2). The much faster O(n log n) implementation was programmed > and is in the pcaPP package. When I say much faster, I mean that my > implementation in Excel VBA was faster than R for 10,000 or so pairs. > R-Core decided not to implement that code, and instead made a note about > the faster implementation living in pcaPP in the help for ?cor?. See [1] > for the 2012 discussion. My point is it?s really really difficult to get > something in Base R. Develop it well, put it in a package, and you have > basically the same result. > > Avi > > [1] https://stat.ethz.ch/pipermail/r-devel/2012-June/064351.html > > On Fri, Oct 11, 2019 at 9:55 AM Morgan Morgan <morgan.emailbox at gmail.com> > wrote: > >> How do you prove usefulness of a feature? >> Do you have an example of a feature that has been added after proving to >> be >> useful in the package space first? >> >> Thank you, >> Morgan >> >> On Fri, 11 Oct 2019 13:53 Michael Lawrence, <lawrence.michael at gene.com> >> wrote: >> >> > Thanks for this interesting suggestion, Morgan. While there is no strict >> > criteria for base R inclusion, one criterion relevant in this case is >> that >> > the usefulness of a feature be proven in the package space first. >> > >> > Michael >> > >> > >> > On Fri, Oct 11, 2019 at 5:19 AM Morgan Morgan < >> morgan.emailbox at gmail.com> >> > wrote: >> > >> >> On Fri, 11 Oct 2019 10:45 Duncan Murdoch, <murdoch.duncan at gmail.com> >> >> wrote: >> >> >> >> > On 11/10/2019 6:44 a.m., Morgan Morgan wrote: >> >> > > Hi All, >> >> > > >> >> > > I was looking for a function to find a small matrix inside a larger >> >> > matrix >> >> > > in R similar to the one described in the following link: >> >> > > >> >> > > >> >> > >> >> >> https://www.mathworks.com/matlabcentral/answers/194708-index-a-small-matrix-in-a-larger-matrix >> >> > > >> >> > > I couldn't find anything. >> >> > > >> >> > > The above function can be seen as a "generalisation" of the "which" >> >> > > function as well as the function described in the following post: >> >> > > >> >> > > >> >> > >> >> >> https://coolbutuseless.github.io/2018/04/03/finding-a-length-n-needle-in-a-haystack/ >> >> > > >> >> > > Would be possible to add such a function to base R? >> >> > > >> >> > > I am happy to work with someone from the R core team (if you wish) >> and >> >> > > suggest an implementation in C. >> >> > >> >> > That seems like it would sometimes be a useful function, and maybe >> >> > someone will point out a package that already contains it. But if >> not, >> >> > why would it belong in base R? >> >> > >> >> >> >> If someone already implemented it, that would great indeed. I think it >> is >> >> a >> >> very general and basic function, hence base R could be a good place for >> >> it? >> >> >> >> But this is probably not a good reason; maybe someone from the R core >> team >> >> can shed some light on how they decide whether or not to include a >> >> function >> >> in base R? >> >> >> >> >> >> > Duncan Murdoch >> >> > >> >> >> >> [[alternative HTML version deleted]] >> >> >> >> ______________________________________________ >> >> R-devel at r-project.org mailing list >> >> https://stat.ethz.ch/mailman/listinfo/r-devel >> >> >> > >> > >> > -- >> > Michael Lawrence >> > Scientist, Bioinformatics and Computational Biology >> > Genentech, A Member of the Roche Group >> > Office +1 (650) 225-7760 >> > michafla at gene.com >> > >> > Join Genentech on LinkedIn | Twitter | Facebook | Instagram | YouTube >> > >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > -- > Sent from Gmail Mobile >[[alternative HTML version deleted]]