saveSpectra: read or save a 'SpectraInTime-class' from or to a '.txt' file

View source: R/saveSpectraInTime.R

saveSpectraR Documentation

read or save a SpectraInTime-class from or to a .txt file

Description

read or save a SpectraInTime-class from or to a .txt file

Usage

saveSpectra(object, directory, precision = 32)

readSpectra(file)

Arguments

object

object to save

directory

directory to save object

precision

number of significant digits controlling precission

file

to be read

Value

the path to which the file is saved

SpectraInTime-class

Note

experiment name is used to save the experiment

default time formats are assumed to convert to SpectraInTime-class

some data precession is lost because of internal conversion to JSON format

Author(s)

Adriaan Blommaert

Examples

   
 spectra         <-  getSpectraInTimeExample()
 saveSpectra(  spectra , directory )
 experimentName  <-  getExperimentName( spectra )
 file            <-  file.path( directory , paste0( experimentName , ".txt")  )
 spectraRead     <-  readSpectra( file )
 

spectralAnalysis documentation built on Jan. 11, 2023, 5:15 p.m.