plot.mr: Plot multiple-response objects

View source: R/multiresp.R

plot.mrR Documentation

Plot multiple-response objects

Description

The plot method for mr objects is an UpSet plot, showing co-occurences of the various categories. The image method is a heatmap of the variable plotted against itself with mtable.

Usage

## S3 method for class 'mr'
plot(x, ...)
## S3 method for class 'mr'
image(x, type = c("overlap", "conditional", "association",
"raw"), ...) 
## S3 method for class 'mr'
barplot(height,...)

Arguments

x

mr object

type

"overlap" is a plot of counts, "conditional" is of column proportions, "association" has rows and columns scaled to give unit diagonals. "raw" just plots as.logical(x).

height

mr object; the barplot will be of mtable(height)

...

Passed to barplot but otherwise not used

Value

Used for its side effect

See Also

as.mr, mtable

Examples

data(rstudiosurvey)
other_software<- as.mr(rstudiosurvey[[40]])
## only those with at least 20 responses
common<-mr_lump(other_software, n=20)
common<-mr_drop(common, "None")

## UpSet plot
plot(common)

## images

image(common, type="conditional")
image(common, type="association")

tslumley/rimu documentation built on March 21, 2024, 5:58 a.m.