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).
Usage
ir_export_prepare(
x,
what = "metadata",
measurement_id = as.character(seq_len(nrow(x)))
)
Arguments
- x
An object of class
ir
.- what
A character value defining what to prepare for export. If
"metadata"
, the metadata will be prepared for export and columnspectra
will be dropped. If"spectra"
,x
is converted to an object of classir_flat
.- measurement_id
A character vector an element for each row in
x
that contains the names to use as column names for the spectra in their_flat
object to create.
Note
This function superseded irp_export_prepare()
from the
'irpeat' package.