Learn R Programming

iNZightMR (version 2.3.0)

barplotMR: 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 mrocalc barplotMR(obj, ...)

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

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

# S3 method for 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

Junjie Zheng

Examples

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

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

Run the code above in your browser using DataLab