Learn R Programming

compareGroups (version 4.9.0)

missingTable: Table of missingness counts by groups.

Description

This functions returns a table with the non-available frequencies from a already build bivariate table.

Usage

missingTable(obj,...)

Value

An object of class 'createTable'. For further details, see 'value' section of createTable help file.

Arguments

obj

either a 'compareGroups' or 'createTable' object.

...

other arguments passed to createTable.

See Also

createTable

Examples

Run this code


require(compareGroups)

# load regicor data
data(regicor)

# table of descriptives by recruitment year
res <- compareGroups(year ~ age + sex + smoker + sbp + histhtn + 
         chol + txchol + bmi + phyact + pcs + death, regicor)
restab <- createTable(res, hide.no = "no")

# missingness table
missingTable(restab,type=1)


if (FALSE) {

# also create the missing table from a compareGroups object
miss <- missingTable(res)
miss

# some methods that works for createTable objects also works for objects 
#   computed by missTable function.
miss[1:4]
varinfo(miss)
plot(miss)

#... but update methods cannot be applied (this returns an error).
update(miss,type=2) 

}


Run the code above in your browser using DataLab