Skip to contents

Exports a libs_spectrum to a CSV file with a wavelength_nm column plus one column per shot.

Usage

ls_write_csv(x, path, include_metadata = TRUE)

Arguments

x

A libs_spectrum object.

path

Character. Output file path.

include_metadata

Logical. Prepend metadata as comment lines. Default TRUE.

Value

Invisibly returns path.

Examples

spec <- ls_simulate_spectrum(seed = 1)
tmp <- tempfile(fileext = ".csv")
ls_write_csv(spec, tmp)
unlink(tmp)