checkMicroFormat: Check that an input data structure is a valid "Micro...

checkMicroFormatR Documentation

Check that an input data structure is a valid "Micro Evaluation" structure

Description

checkMicroFormat checks that a given data frame meets certain criteria and returns either a modified version of that data frame or an "empty" micro evaluation frame with given dose data and column names. See the details section below for more information.

Usage

checkMicroFormat(data, doseCol = getEctdColName("Dose"), mustHaveDose = FALSE)

Arguments

data

(Required) A data frame to check for validity

doseCol

(Optional) The "Dose" variable name within the supplied data. "DOSE" by default

mustHaveDose

(Optional) Should the "doseCol" variable necessarily be present? Default FALSE

Details

checkMicroFormat will perform a series of basic checks on data.

The checks for a valid structure are as follows: (1) data is a data frame (2) data has at least 1 row (3) if "mustHaveDose" is TRUE, data contains a "Dose" column (given by doseCol)

If any of these fail it will stop or return a NULL structure

Value

A data frame as described above

Author(s)

Francisco Gochez

See Also

createEmptyMicro

Examples



  checkMicroFormat(data = data.frame(DOSE = 1:4),
  doseCol = "DOSE",
  mustHaveDose = TRUE)


MikeKSmith/MSToolkit documentation built on July 3, 2024, 1:53 a.m.