readHeader: Read Header

View source: R/prep_importData.r

readHeaderR Documentation

Read Header

Description

This functions reads in the sample-list file and prepares the header to be fused with the spectral data. Usually you do not need to call this function.

Usage

readHeader(md = getmd(), slType = "def", multiplyRows = "def")

Arguments

md

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

slType

Character. The type of sample-list file in the sampleLists/ sl_in folder. Possible values are:

  • def: Gets the value from the metadata file (variable sampleListType.) (variable 'imp_sampleListType')

  • NULL: By providing 'NULL' to the argument slType you indicate hat no sample-list should be imported to create the header. This would be the case if you use a custom-function to import your spectral data and all the necessary class- and numerical variables are already defined in the same file that holds the spectral data. Please refer to custom_import for further information on the requirements for this custom import function. A custom function can be used to import spectral data and at the same time import additional variables from a sample-list file by providing one of the characters listed below.

  • xls: an Excel file ending in '.xlsx'

multiplyRows

Character or Logical. If the rows in the sample list should be multiplied by the number of consecutive scans as specified in the variable nrConScans) in the metadata of the experiment.

  • def: If the argument multiplyRows in the function getFullData is left at def, the value (TRUE or FALSE or auto) from the variable multiplyRows from the **metadata file** is used.

  • auto: Checks if there is an error column in the sample list. If no error column and no column for consecutive scans or only the error column is present, the rows in the sample list will be multiplied by the numer of consecutive scans as given in the metadata. The values in the error column (if any) will be used to correct the number of consecutive scans for each respective sample. If no error column, but a column for consecutive scans is present in the sample list, it will **not** be multiplied.

  • FALSE: The sample list will be left as it is. In that case it is the users responsibility to provide a sample list with the rows correctly multiplied to match the number of consecutive scans in the dataset.

  • TRUE: For multiplying every row in the sample list by the number of consecutive scans as specified in nrConScans in the metadata of the experiment. If values are given in the error column in the sample list, the consecutive scans for each sample will be corrected by this number.

Please also refer to exportSampleList and the explanation to the argument multiplyRows therein.

Details

From the metadata, provided in the first argument, the experiment name is extracted; the sample list (what is used to create the header) must be in the sampleLists/sl_in folder and must be named with the experiment name, followed by a "-in" and then the file extension.

See Also

getFullData

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

Examples

## Not run: 
 header <- readHeader()

## End(Not run)

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