inspect.data: Check formatted data based on a pre-defined information

Description Usage Arguments Value

Description

A function to check a formatted data frame based on a pre-defined information.

Usage

1
2
inspect.data(data, info, id, check_missing = c(TRUE, FALSE),
  plot = FALSE, prefix = "", outdir)

Arguments

data

a formatted data frame to be checked.

info

a data frame specifies how variables will be formatted. This data frame should have the following columns: varname (character variable specifies name of each variable), label (character variable specifies label of each variables), type (character variable specifies type of each variable [numeric, factor, character, datetime], unit (character variable specifies units of each continuous variable), value (character variable specifies values of each variable [format of datetime variables/values of categorical variables], levels (character variable specifies order of levels of each categorical variable), missing (character variable specifies coding for missing values for each variable), condition (character variable specifies conditional checking), strict (a character variable [Yes, No] specifies whether missing data should be checked for each variable).

id

a character specifies name of subject id variable.

check_missing

a logical value specifies whether missing data should be checked.

plot

a logical value specifies whether plot (bar plot for categorical variables, boxplot for continuous variables) should be produced.

prefix

a character to be appended as prefix of all output files.

outdir

a character specifies where to save output files.

Value

A data frame lists all identified potential data errors.


lampk/C306 documentation built on Sept. 11, 2019, 8:03 a.m.