View source: R/ir_export_prepare.R
ir_export_prepare | R Documentation |
ir
objects for export to csv
Prepares ir
objects for export to csv
files. To export ir
objects to
csv
, the spectra
column has to be converted to an own data frame and be
exported separately from the metadata.
When preparing metadata for export, ir_export_prepare
takes care of
separating measurement units and measurement errors in columns of class
units::units, errors::errors, and quantities::quantities (see the
examples).
ir_export_prepare(
x,
what = "metadata",
measurement_id = as.character(seq_len(nrow(x)))
)
x |
An object of class |
what |
A character value defining what to prepare for export.
If |
measurement_id |
A character vector an element for each row in |
A data frame.
This function superseded irp_export_prepare()
from the
'irpeat' package.
x_spectra <- ir_export_prepare(ir_sample_data[1:5, ], what = "spectra")
x_metadata <- ir_export_prepare(ir_sample_data[1:5, ], what = "metadata")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.