Learn R Programming

lightr (version 1.0)

lr_parse_generic: Generic function to parse spectra files that don't have a specific parser

Description

Generic function to parse spectra files that don't have a specific parser

Usage

lr_parse_generic(filename, decimal = ".", sep = NULL)

Arguments

filename

Path of the file to parse

decimal

Character to be used to identify decimal plates (defaults to .).

sep

Column delimiting characters to be considered in addition to the default (which are: tab, space, and ";")

Value

A list of two elements:

  • a dataframe with columns "wl", "dark", "white", "scope" and "processed", in that order

  • a list with metadata including

Examples

Run this code
# NOT RUN {
lr_parse_generic(system.file("testdata", "spec.csv", package = "lightr"),
                 sep = ",")
lr_parse_generic(system.file("testdata", "CRAIC_export.txt",
                             package = "lightr"))

# }

Run the code above in your browser using DataLab