lr_get_spec | R Documentation |
Finds and imports reflectance/transmittance/absorbance data from spectra files in a given location.
lr_get_spec(
where = getwd(),
ext = "txt",
lim = c(300, 700),
decimal = ".",
sep = NULL,
subdir = FALSE,
subdir.names = FALSE,
ignore.case = TRUE,
interpolate = TRUE
)
where |
Folder in which files are located (defaults to current working directory). |
ext |
File extension to be searched for, without the "." (defaults to
|
lim |
A vector with two numbers determining the wavelength limits to be
considered (defaults to |
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 ";") |
subdir |
Should subdirectories within the |
subdir.names |
Should subdirectory path be included in the name of the
spectra? (defaults to |
ignore.case |
Should the extension search be case insensitive? (defaults
to |
interpolate |
Boolean indicated whether spectral data should be
interpolated and pruned at every nanometre. Note that this option can only
work if all input data samples the same wavelengths. Defaults to |
You can customise the type of parallel processing used by this function with
the future::plan()
function. This works on all operating systems, as well
as high performance computing (HPC) environment. Similarly, you can customise
the way progress is shown with the progressr::handlers()
functions
(progress bar, acoustic feedback, nothing, etc.)
A data.frame, containing the wavelengths in the first column and individual imported spectral files in the subsequent columns.
pavo::getspec()
spcs <- lr_get_spec(system.file("testdata", package = "lightr"), ext = "jdx")
head(spcs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.