View source: R/export_ume_results.R
| export_ume_results | R Documentation |
Exports UME analysis results to a structured output folder. The function writes the following objects to CSV (if provided):
pl – peaklist
mfd – full molecular formula dataset
mfd_filt – filtered MFD
mfd_filt_tf – transformed filtered MFD
mfd_filt_tf_pivot – pivoted intensity matrix
ds_tf – transformed diagnostics / statistics
Optionally, the function can export plot objects, create a ZIP archive
of all exported files, and write a metadata file (metadata.R)
containing a reproducibility snapshot that can be used later in
load_ume_results().
export_ume_results(
pl,
mfd,
mfd_filt = NULL,
mfd_filt_tf = NULL,
mfd_filt_tf_pivot = NULL,
ds_tf = NULL,
outdir = NULL,
prefix = "ume",
figures = FALSE,
fig_width = 8,
fig_height = 6,
fig_device = c("png", "pdf"),
zip = TRUE,
metadata = list(),
env = parent.frame()
)
pl |
data.table containing peak data. Mandatory columns include neutral
molecular mass ( |
mfd |
data.table with molecular formula data as derived from
|
mfd_filt |
|
mfd_filt_tf |
|
mfd_filt_tf_pivot |
|
ds_tf |
|
outdir |
Character.
Output directory in which all export files are stored.
The directory is created if it does not exist.
Must be provided explicitly; no default is used to comply with CRAN
policies on writing to the user's filespace.
For temporary exports, use e.g. |
prefix |
Character.
Prefix for all exported file names (e.g., |
figures |
Controls figure export:
Recognized plot types are: ggplot, plotly, and recordedplot (base R). |
fig_width, fig_height |
Numeric.
Dimensions of exported figures in inches.
Default: |
fig_device |
Character.
File format for figure export.
One of |
zip |
Logical.
If |
metadata |
Named list.
Additional metadata to write into |
env |
Environment.
Environment from which figure objects should be collected.
Default: |
Export UME Analysis Results
Invisibly returns:
the path to the ZIP file (if zip = TRUE), or
the path to the output directory (if zip = FALSE).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.