Closed jorainer closed 2 years ago
Totally agree. Did I send you already a table? I don't know yet. I generated it with rcdk
. We can include the script in inst/scripts
.
We should also leave the possibility for users to define their own data.frame
. By default the methods can use ours, but users can overwrite this. What do you think?
Excellent suggestions (both of it). What would be the requirements for the user-defined table? just name, multiplicative factor and additive factor?
Oh, I just saw you have it already in inst
. I was just about to add it to my devel branch. I would suggest to have also the formula parts, because then you could calculate also an ion formula.
@michaelwitting , sorry, lost totally the overview here - do you have some additional adduct definitions we could add or the formula parts that you mentioned above?
Also @stanstrup , could you please have a look if you could add some of the adducts you provide with the https://github.com/stanstrup/commonMZ package?
Happy with the adducts currently covered!
The current
mass2mz
implementation suffers a little bit on the way adducts are defined and returned. They are currently stored in a list of lists which is generated and calculated on-the-fly each time. I suggest we use a pre-build data frame instead that is created during package loading time. This can improve the speed. Note that this speed improvement will be crucial if the function is applied repeatedly (e.g. in for loops).The benchmark for this: