Description Usage Arguments Details Value Note Author(s) See Also
View source: R/table_annotate.R
table_annotate()
compares the 20 most important variables
identified in the PLS-DA and Random Forests modelling of the LCMS data with
the monoisotopic mass of those in coralmz.
1 | table_annotate(ppm = 50, save.impvars = FALSE, save.matches = FALSE)
|
ppm |
Numeric mass error to use for cross referencing |
save.impvars |
Logical indicating if the table of the 20 most important
variables for each model should be saved to |
save.matches |
Logical indicating if the table of cross referencing
matches should be save to |
table_annotate()
Loads the LCMS PLS-DA and LCMS RF models and
creates a table (list$imp_vars
) of the 20 most important variables
according to varImp
. The cross referencing relies on the
user defined mass error. Three variables are created to define the upper and
lower bounds of the mass error:
The neutral mass of the ion calculated by subtracting the monoisotopic mass of the hydrogen ion (1.007276 Da)
Equal to mz_neutral - the user defined ppm error
Equal to mz_neutral + the user defined ppm error
The table of the 20 most important variables and their mass error can be
optionally saved to ./inst/extdata/
as a .rds
file. Matches with compounds in the coralmz
package, if any,
are retrieved and can be optionally saved to ./tables/
as a comma
separated .txt
file.
Returns a list containing the important and matched variables
Commas in the references variable are replaced with semi colons to
avoid conflicts with downstream use of the .csv
file. Although this
function is exported, table_crossref()
was not intended to be used
outside of this package.
Benjamin R. Gordon
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.