Giter Club home page Giter Club logo

Comments (4)

sneumann avatar sneumann commented on June 8, 2024

What could have been the reason we had them as methods initially ?
I am not an expert in R language aesthetics. Would the choice change
if other packages also had group() functions/methods ? What else
influences the choice between function/method ? Happy to get just
a pointer to relevant documents/best practice rather than you having
to elaborate a long answer. Yours, Steffen

from xcms.

jorainer avatar jorainer commented on June 8, 2024

It relates a little to lgatto/MSnbase#111 .
Principally, methods only really make sense if they are implemented for at least two different objects; otherwise a function would suffice. Also, as you already mentioned, it makes sense when a generic is defined in another package.
I find also the documentation of functions easier to read (and to create) than for methods.

from xcms.

sneumann avatar sneumann commented on June 8, 2024

So this is a no-brainer for specDist and findPeaks, but the name group() might be too
generic to get away with a simple function. Can one easily check the expected fallout
from changing group() ?

from xcms.

jorainer avatar jorainer commented on June 8, 2024

I think I was not clear here: I don't want to change group from a method to a function, but the downstream methods group.density, group.nearest etc. To the user this wouldn't change anything.
So, the group, findPeaks and specDist will remain methods (also because in the long run they might be implemented also for OnDiskMSnExp objects in addition to the xcmsRaw).

from xcms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.