Match peaks according to m/z and RT.
mz_rt_match(
data1,
data2,
mz.tol,
rt.tol = 30,
rt.error.type = c("relative", "abs")
)
First data for matching, first column must be mz and seconod column must be rt.
Second data for matching, first column must be mz and seconod column must be rt.
mz tol for ms1 and ms2 data matching.
RT tol for ms1 and ms2 data matching.
RT error is calculated with relative or absolute.
Return a result which give the matching result of data1 and database.
data1 <- data.frame(mz = 1:10, rt = 1:10)
data2 <- data.frame(mz = 1:10, rt = 1:10)
mz_rt_match(data1, data2, mz.tol = 10)
#> Index1 Index2 mz1 mz2 mz error rt1 rt2 rt error
#> 1 1 1 1 1 0 1 1 0
#> 2 2 2 2 2 0 2 2 0
#> 3 3 3 3 3 0 3 3 0
#> 4 4 4 4 4 0 4 4 0
#> 5 5 5 5 5 0 5 5 0
#> 6 6 6 6 6 0 6 6 0
#> 7 7 7 7 7 0 7 7 0
#> 8 8 8 8 8 0 8 8 0
#> 9 9 9 9 9 0 9 9 0
#> 10 10 10 10 10 0 10 10 0