| filter_mz | R Documentation |
Facilitates filtering by given mass-to-charge ratios (m/z) with a defined tolerance. Can also be used to filter based on exact mass.
filter_mz(data, m_z_col, masses, tolerance = 5, tolerance_type = "ppm")
data |
A tidy tibble created by |
m_z_col |
Which column holds the precursor m/z (or exact mass)? Uses |
masses |
The mass(es) to filter by. |
tolerance |
A numeric. The tolerance to apply to the masses Either an absolute value in Da (if |
tolerance_type |
Either |
A filtered tibble.
# Use a tolerance of plus or minus 5 ppm
toy_metaboscape %>%
filter_mz(m_z_col = `m/z`, 162.1132, tolerance = 5, tolerance_type = "ppm")
# Use a tolerance of plus or minus 0.005 Da
toy_metaboscape %>%
filter_mz(m_z_col = `m/z`, 162.1132, tolerance = 0.005, tolerance_type = "absolute")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.