Learn R Programming

mosaic (version 0.9.1-3)

diffmean: Difference in means and proportions

Description

Wrappers around diff(mean(...)) and diff(prop(...)) that facilitate better naming of the result

Usage

diffmean(...)

diffprop(...)

Arguments

...
arguments passed to mean

Examples

Run this code
if (require(mosaicData)) {
diffprop( homeless ~ sex , data=HELPrct)
do(3) * diffprop( homeless ~ shuffle(sex) , data=HELPrct)
diffmean( age ~ substance, data=HELPrct)
do(3) * diffmean(age ~ shuffle(substance), data=HELPrct)
diffmean( age ~ sex, data=HELPrct)
do(3) * diffmean(age ~ shuffle(sex), data=HELPrct)
}

Run the code above in your browser using DataLab