Closed sneumann closed 3 years ago
This is strange. I can not reproduce:
sps2 <- Spectra()
res <- compareSpectra(sps2)
res
<0 x 0 matrix>
and if one of the two Spectra
is not empty (in this case having length 20):
res <- compareSpectra(sps, sps2)
res
[1,]
[2,]
[3,]
[4,]
[5,]
[6,]
[7,]
[8,]
[9,]
[10,]
[11,]
[12,]
[13,]
[14,]
[15,]
[16,]
[17,]
[18,]
[19,]
[20,]
I created the spectra via a DataFrame
, because I want to fill some gaps in a Spectra
object. I set mz and intensity to NA instead of having it empty. That caused the problem. If I use an empty list its fine!
Thanks for the clarification. A simple example would help too. In general, NA_real_
intensity values should be supported but NA_real_
m/z values not.
Closing this issue now - feel free to re-open if needed.
Hi, @michaelwitting found that comparison with an empty spectrum hangs. Instead it should return N/A. Stay tuned for details and test case. Yours, Steffen