Drawchromatogram getting error
garimaloh opened this issue · 5 comments
DrawChromatogram(d_pos[abs(mz - mzi) < mzi/1e610][time > 22][time < 25]$time,d_pos[abs(mz - mzi) < mzi/1e610][time >22][time < 25]$intensity)
Getting error on running above command. d is a data table.
Error in data.frame(retentionTime, peakArea, apexIntensity) :
arguments imply differing number of rows: 0, 1
In addition: Warning messages:
1: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
2: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
3: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
4: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
Hi,
It looks like you have time
and intensity
arguments to DrawChromatogram. Values are also needed for the third argument range
. Range is a list describing the start and stop time points for each peak, defined as range = list(start, stop), where start is the numeric vector of starting time points and stop is the numeric vector of the respective ending time points. The help file for DrawChromatogram has two examples showing the use of range
.
Thanks for replying. I have set up range. Still its showing same error.> y=DrawChromatogram (d_pos[abs(mz - mzi) < mzi/1e610]$time,d_pos[abs(mz - mzi) < mzi/1e610]$intensity,range=list(9:11))
Error in data.frame(retentionTime, peakArea, apexIntensity) :
arguments imply differing number of rows: 0, 1
In addition: Warning messages:
1: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
2: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
3: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
4: In max(peakIntensity) : no non-missing arguments to max; returning -Inf
Thanks a lot its working now
I had to put start and stop
Great!