decomposeIsotopes changes original intensity values
Opened this issue · 1 comments
jorainer commented
We used the decomposeIsotopes
in one of our workflows but realized at some point that the original data was changed. Seems that this function replaces the intensity values in the main environment:
> library(Rdisop)
> mzs <- c(147.0529, 148.0563)
> ints <- c(100.0, 5.561173) * 2
> ints
[1] 200.00000 11.12235
> res <- decomposeIsotopes(mzs, ints)
> ints
[1] 0.94731801 0.05268199
As you see the values in the ints
variable got changed by the decomposeIsotopes
call. Seems the function does not do the standard R copying but changes the values in place?
sneumann commented
Thanks for reporting, that should not be the case.
Sounds like this happens in the R/C++ interface.
Yours, Steffen