barplotMR: Multiple response barplot

View source: R/barplot.R

barplotMRR Documentation

Multiple response barplot

Description

Draws a barplot of a multiple response object (MRO), showing response rates for each option along with confidence intervals and comparison intervals.

Usage

barplotMR(obj, ...)

## S3 method for class 'mrocalc'
barplotMR(obj, ...)

## S3 method for class 'bymrocalc'
barplotMR(obj, g1.level = NULL, g2.level = "_MULTI", ...)

## S3 method for class 'between'
barplotMR(obj, ...)

## S3 method for class 'b2'
barplotMR(obj, g1.level = NULL, ...)

Arguments

obj

an mrocalc object (from mroPara())

...

additional parameters, currently not used

g1.level

vector of subset variable 1 levels to show

g2.level

vector of subset variable 2 levels to show

Methods (by class)

  • barplotMR(mrocalc): method for class mrocalc

  • barplotMR(bymrocalc): method for class bymrocalc

  • barplotMR(between): method for class between

  • barplotMR(b2): method for class b2

Author(s)

Junjie Zheng

Examples

if (requireNamespace("iNZightPlots")) {
    require(iNZightPlots)
    mr <- iNZightMR(online ~ onlinegame + onlinevideo + onlinemusic,
        data = census.at.school.5000
    )
    barplotMR(mroPara(mr))

    barplotMR(byMRO(mr, ~gender, mroPara))
}

iNZightVIT/iNZightMR documentation built on Feb. 3, 2024, 4:42 p.m.