readSpectra: Read Spectra

View source: R/prep_importData.r

readSpectraR Documentation

Read Spectra

Description

Reads in just the spectra from the provided rawdata file.

Usage

readSpectra(md = getmd(), filetype = "def", naString = "NA", sh = NULL)

Arguments

md

List. The object with the metadat of the experiment. The default is to get the metadata file via getmd.

filetype

Character. The type of the spectral raw data file. If a value other than "def" is provided, this is overriding the value of "filetype" in the metadata file. Possible values are:

  • def: Gets the default value from the setings.r file. (variable 'imp_specFileType')

  • vision_NSAS.da: Import from the .da file generated by the Vision-software from a Foss-XDS spectroscope.

  • tabDelim.txt: Import any tab delimited text file that contains only the NIR spectra and *no* additional columns like e.g. time, temperature etc, and that has 1 character in front of the wavelengths in the column names of the NIR spectra.

  • Pirouette.pir: Import spectra *and* any class- or numerical variable directly from a .pir file. Those column-names in the .pir file that match the standard-column names (printStdColnames) as defined in the settings.r file will be assigned to those columns automatically.

  • custom@yourFile.R: It is possible to use a custom import function to import **any** type of spectra. Use custom@yourFile.R, with yourFile.R being an .R-file located in the path specified in the .Renviron file. Please refer to custom_import for further information.

  • xls: Import raw spectra from a xlsx file. Please see the section Import from xlsx below for further details.

  • YunosatoDatFile.dat: Import raw spectra from a .dat file as styled by the Yunosato Aquaphotomics Lab, Japan. Please see the section Import from Yunosato .dat below for further information.

  • MicroNIR.csv A comma separated value file (csv) as generated by the XXX software containing spectra acquired with a MicroNIR device.

naString

Character. What to use as 'NA'. Applies only when 'filetype' is tabDelim.txt.

sh

Character length one. Manual path to settings home. Can and should be left at the default NULL.

Details

This function is mainly for providing a possibility to test custom written rawdata import functions. (see custom_import)

Value

The spectral data in the format as described in 'Value' in custom_import

See Also

getFullData

Other Development Functions: custom_TRH, custom_import, imp_searchAskColumns(), readHeader()


bpollner/aquap2 documentation built on March 29, 2024, 7:33 a.m.