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

Description Usage Arguments Details Value Author(s) See Also Examples

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

1
2
3
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)

Mike K Smith mstoolkit@googlemail.com

See Also

createEmptyMicro

Examples

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

MSToolkit documentation built on May 2, 2019, 6:30 p.m.