Learn R Programming

clintools (version 0.9.10.1)

cdm.fig: Central data monitoring to assess deviations (cdm.fig)

Description

cdm.fig() is a function to assess any deviations

Usage

cdm.fig(df, col, site, meta_title, seedno, output, nmin)

Value

Returns a full markdown output.

Arguments

df

dateframe to be assessed for missing data

col

column to be assessed

site

column with sites

meta_title

Y-axis lab, if empty then it is the column name

seedno

the numeric site, if empty it is just Sys.Date()

output

if 'fig' then the figure is the output, any other will output the blinded site table

nmin

minimum number of variables in site to be presented

Examples

Run this code
if (FALSE) {
   cdm.fig(df,col="Mode of birth",
      site="maternal_trial_site")
   cdm.fig(df,col="Gestational Age at birth",
      site="maternal_trial_site")
   library(knitr)
   kable(cdm.fig(df,col="Mode of birth",
      site="maternal_trial_site",output = ""),row.names=F)
}

Run the code above in your browser using DataLab