Learn R Programming

specmine (version 1.0)

read_dataset_spc: Read dataset from SPC files

Description

Reads the data from the SPC files and creates the dataset.

Usage

read_dataset_spc(folder.data, filename.meta = NULL, type = "undefined", description = "", nosubhdr = F, label.x = NULL, label.values = NULL, header.col.meta = TRUE, header.row.meta = TRUE, sep.meta = ",")

Arguments

folder.data
string containing the path of the data folder.
filename.meta
name of the metadata file.
type
type of the data.
description
a short text describing the dataset.
nosubhdr
if TRUE, it won't read the subheader.
label.x
the label for the x values.
label.values
the label for the y values.
header.col.meta
boolean value indicating if the metadata CSV file contains a header column with the name of the metadata variables.
header.row.meta
boolean value indicating if the metadata CSV file contains a header row with the name of the samples.
sep.meta
the separator character of the metadata file.

Value

Returns the dataset from the SPC files.

Examples

Run this code
## Not run: 
#   ## Example of reading a dataset from SPC files
#   dataset = read_dataset_spc("data", "metadata.csv", type = "ir-spectra", 
# 	    description = "description of the dataset", label.x = "wavelength", 
# 	    label.values = "transmittance")
# ## End(Not run)

Run the code above in your browser using DataLab