lr_get_metadata: Extract metadata from spectra files

Description Usage Arguments Value Warning References Examples

View source: R/get_metadata.R

Description

Finds and imports metadata from spectra files in a given location.

Usage

1
2
3
4
5
6
7
8
9
lr_get_metadata(
  where = getwd(),
  ext = "ProcSpec",
  sep = NULL,
  subdir = FALSE,
  subdir.names = FALSE,
  cores = getOption("mc.cores", 2L),
  ignore.case = TRUE
)

Arguments

where

Folder in which files are located (defaults to current working directory).

ext

File extension to be searched for, without the "." (defaults to txt). You can also use a character vector to specify multiple file extensions.

sep

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

subdir

Should subdirectories within the where folder be included in the search? (defaults to FALSE).

subdir.names

Should subdirectory path be included in the name of the spectra? (defaults to FALSE).

cores

Number of cores to be used. If greater than 1, import will use parallel processing (not available in Windows).

ignore.case

Should the extension search be case insensitive? (defaults to TRUE)

Value

A data.frame containing one file per row and the following columns:

Warning

white_inttime, dark_inttime and sample_inttime should be equal. The normalised data may be inaccurate otherwise.

References

White TE, Dalrymple RL, Noble DWA, O'Hanlon JC, Zurek DB, Umbers KDL. Reproducible research in the study of biological coloration. Animal Behaviour. 2015 Aug 1;106:51-7 (doi: 10.1016/j.anbehav.2015.05.007).

Examples

1
2
3
lr_get_metadata(system.file("testdata", "procspec_files",
                            package = "lightr"),
                ext = "ProcSpec")

Bisaloo/lightr documentation built on Jan. 15, 2020, 5:13 p.m.