create_catalog: Function to create a catalog of level 0 files to be merged.

View source: R/create_catalog.R

create_catalogR Documentation

Function to create a catalog of level 0 files to be merged.

Description

This function is meant for creating a catalog of all level 0 data files listed that will be merged with the 'merge_level0' function. All arguments are required, with exception of 'additional.info'.

Usage

create_catalog(
  file,
  sheet,
  skip.rows,
  date,
  compound,
  istd,
  col.names.loc,
  sample,
  type,
  peak,
  istd.peak,
  conc,
  analysis.param,
  num.rows = NULL,
  additional.info = NULL,
  verbose = TRUE
)

Arguments

file

(character vector) Vector of character strings with the file names of level 0 data.

sheet

(character vector) Vector of character strings containing the sheet name with MS data.

skip.rows

(numeric vector) Numeric vector containing the number of rows to skip in data file.

date

(character vector) Vector of character strings containing the date of data collection, format "MMDDYY". "MM" = 2 digit month, "DD" = 2 digit day, and "YY" = 2 digit year.

compound

(character vector) Vector of character strings with the relevant chemical identifier.

istd

(character vector) Vector of character strings with the internal standard.

col.names.loc

(numeric vector) Numeric vector containing the row locations of the column names.

sample

(character vector) Vector of character strings with column names containing samples.

type

(character vector) Vector of character strings with column names containing type information.

peak

(character vector) Vector of character strings with the column names containing mass spectrometry (MS) peak data.

istd.peak

(character vector) Vector of character strings with column names containing internal standard (ITSD) peak data.

conc

(character vector) Vector of character strings with column names containing exposure concentration data.

analysis.param

(character vector) Vector of character strings with column names containing analysis parameters.

num.rows

(numeric vector) Numeric vector containing the number of rows with data to be pulled. (Default is NULL.)

additional.info

(list or data.frame) Named list or data.frame of additional columns to include in the catalog. Additional columns should follow the nomenclature of "<Fill-in>.ColName" if indicating column names with information to pull, otherwise a short name. All spaces in additional column names should be designated with a period, "." . (Default is NULL, i.e. no additional columns.)

verbose

(logical) Indicate whether printed statements should be shown. (Default is TRUE.)

Value

(data.frame) A catalog containing information about the source level-0 data file to enable proper 'auto-extraction' of data. Additionally, the catalog contains other relevant meta-data fields describing when, how, what, etc. of the assay that collected the level-0 data.

See Also

merge_level0

Examples

create_catalog(
  file = "testME.xlsx",sheet = "3",skip.rows = 0,
  date = "112723",compound = "80-05-7",
  istd = "Chemical A", col.names.loc = 1, 
  sample = "Sample.Name",type = "Type",
  peak = "Response.Area",istd.peak = "ISTD.Peak.Area",
  conc = "Intended.Concentration",analysis.param = "A,B,C"
)


invitroTKstats documentation built on Aug. 23, 2025, 9:08 a.m.