importExport_raw_toXls: Import Raw, Export to Xls

View source: R/prep_importData.r

importExport_raw_toXlsR Documentation

Import Raw, Export to Xls

Description

Imports a given rawdata file in any of the supported formats, reads in the Timestamps (if present) and exports the content (NIR spectra and any class- and numerical variables) immediately to xlsx. Most checks that are done when calling 'gfd()' will be omitted. This function can be helpful if you want to just get your hands on the rawdata.

Usage

importExport_raw_toXls(md = getmd(), filetype = "def", 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.

sh

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

Value

Returns (invisible) the obtained data. Mainly used for its side-effects, i.e. to directly export rawdata to xlsx.


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