UpSetR
UpSetR copied to clipboard
Introduces title to plots (closes #76)
- updated NEWS
- minor differences in upset.Rd likely due to different roxygen versions
- NAMESPACE changes (not committed) likely due to roxygen versions/out of date build
Adds title and title.pos arguments to upset, with respective defaults "" and c(x=0.65, y=0.95) (above the main plot components). No impact to plot when not used (plots the empty string as text) but the call to grid.text could be avoided entirely if you require.
Example:
library(UpSetR)
movies <- read.csv( system.file("extdata", "movies.csv", package = "UpSetR"), header=TRUE, sep=";" )
upset(movies, nsets = 7, nintersects = 30, mb.ratio = c(0.5, 0.5),
order.by = c("freq", "degree"), decreasing = c(TRUE,FALSE),
title = "Movies", title.pos = c(x = 0.1, y = 0.95))

Re-aligned with master branch. I believe the errors in checks are unrelated to this PR.
Any chance this can be merged and updated on CRAN? I'd love to be able to quickly add titles without having to mess with grid.text()!