Errors in running code in vignettes:
when running code in 'methodComparison.Rnw'

> options(keep.source = TRUE, width = 60)

> packageInfo <- packageDescription("vipor")

> library(vipor)

> packageKeywords <- "visualization, display, one dimensional, grouped, groups, violin, scatter, points, quasirandom, beeswarm, van der Corput, beanpl ..." ... [TRUNCATED] 

> library(vipor)

> library(beeswarm)

> library(beanplot)

> library(vioplot)
Loading required package: sm
Package 'sm', version 2.2-5.6: type help(sm) for summary information
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric


> set.seed(12345)

> dat <- list(rnorm(50), rnorm(500), c(rnorm(100), rnorm(100, 
+     5)), rcauchy(100))

> names(dat) <- c("Normal", "Dense Normal", "Bimodal", 
+     "Extremes")

> par(mfrow = c(4, 1), mar = c(2.5, 3.1, 1.2, 0.5), 
+     mgp = c(2.1, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2)

> dummy <- sapply(names(dat), function(label) {
+     y <- dat[[label]]
+     plot(1, 1, type = "n", xlab = "", xaxt = "n", ylab = "y value", 
+       .... [TRUNCATED] 

> x <- rep(names(dat), sapply(dat, length))

> y <- unlist(lapply(dat, function(x) x/max(abs(x))))

> par(mfrow = c(4, 1), mar = c(6, 4.5, 1.2, 0.5), mgp = c(3.3, 
+     0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2, 
+     las = 1)

> vpPlot(x, y, ylab = "", cex = 0.7, pch = 21, col = "#00000044", 
+     bg = "#00000011")

> boxplot(y ~ x, main = "Boxplot", ylab = "")

> beanplot(y ~ x, main = "Beanplot", ylab = "")

> vioInput <- split(y, x)

> labs <- names(vioInput)

> names(vioInput)[1] <- "x"

> do.call(vioplot, c(vioInput, list(names = labs, col = "white")))

> title(main = "Vioplot")

> y <- log10(counties$landArea)

> offsets <- list(Quasi = offsetX(y), Pseudo = offsetX(y, 
+     method = "pseudorandom", nbins = 100), `Min out` = offsetX(y, 
+     method = "minout ..." ... [TRUNCATED] 

> ids <- rep(1:length(offsets), each = length(y))

> tmpPng <- tempfile(fileext = ".png")

> png(tmpPng, height = 1200, width = 1800, res = 300)

> par(mar = c(2.5, 3.5, 0.2, 0.2))

> plot(unlist(offsets) + ids, rep(y, length(offsets)), 
+     xlab = "", xaxt = "n", yaxt = "n", pch = ".", ylab = "Land area (square miles)", 
+      .... [TRUNCATED] 

> par(lheight = 0.8)

> axis(1, 1:length(offsets), names(offsets), padj = 1, 
+     mgp = c(0, -0.3, 0), tcl = -0.3, cex.axis = 0.65)

> axis(2, pretty(y), format(10^pretty(y), scientific = FALSE, 
+     big.mark = ","), mgp = c(0, 0.5, 0), tcl = -0.3, las = 1, 
+     cex.axis = 0.75)

> dev.off()
pdf 
  2 

> par(mfrow = c(5, 1), mar = c(3.5, 3.1, 1.2, 0.5), 
+     mgp = c(2.1, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2, 
+     las = 1)

> plotFunc <- function(x, y, offsetXArgs) {
+     vpPlot(x, y, ylab = "Log treatment effect", pch = 21, col = "#00000099", 
+         bg = "#00000033" .... [TRUNCATED] 

> addMeanLines <- function(x, y, col = "#FF000099") {
+     means <- tapply(y, x, mean)
+     segments(1:length(means) - 0.25, means, 1:length(means)  .... [TRUNCATED] 

> plotFunc(OrchardSprays$treatment, log(OrchardSprays$decrease), 
+     list(width = 0.2))

> title(main = "Quasirandom")

> plotFunc(OrchardSprays$treatment, log(OrchardSprays$decrease), 
+     list(method = "pseudo", width = 0.2))

> title(main = "Pseudorandom")

> plotFunc(OrchardSprays$treatment, log(OrchardSprays$decrease), 
+     list(method = "maxout", width = 0.2))

> title(main = "Max outside")

> beeInput <- split(log(OrchardSprays$decrease), OrchardSprays$treatment)

> beeswarm(beeInput, las = 1, ylab = "Log treatment effect", 
+     xlab = "Treatment", pch = 21, col = "#00000099", bg = "#00000033", 
+     main = " ..." ... [TRUNCATED] 

> addMeanLines(OrchardSprays$treatment, log(OrchardSprays$decrease))

> plotFunc(OrchardSprays$treatment, log(OrchardSprays$decrease), 
+     list(method = "tukey", width = 0.2))

> title(main = "Tukey")

> data("singer", package = "lattice")

> parts <- sub(" [0-9]+$", "", singer$voice)

> par(mfrow = c(5, 1), mar = c(3.5, 3.1, 1.2, 0.5), 
+     mgp = c(2.1, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2, 
+     las = 1)

> plotFunc <- function(x, y, ...) {
+     vpPlot(x, y, ylab = "Height", pch = 21, col = "#00000099", 
+         bg = "#00000033", ...)
+     addMeanLi .... [TRUNCATED] 

> plotFunc(parts, singer$height, main = "Quasirandom")

> plotFunc(parts, singer$height, offsetXArgs = list(method = "pseudo"), 
+     main = "Pseudorandom")

> plotFunc(parts, singer$height, offsetXArgs = list(method = "maxout"), 
+     main = "Max outside")

> beeInput <- split(singer$height, parts)

> beeswarm(beeInput, ylab = "Height", main = "Beeswarm", 
+     pch = 21, col = "#00000099", bg = "#00000033")

> addMeanLines(parts, singer$height)

> plotFunc(parts, singer$height, offsetXArgs = list(method = "tukey"), 
+     main = "Tukey")

> y <- c(beaver1$temp, beaver2$temp)

> x <- rep(c("Beaver 1", "Beaver 2"), c(nrow(beaver1), 
+     nrow(beaver2)))

> par(mfrow = c(3, 2), mar = c(3.5, 4.5, 1.2, 0.5), 
+     mgp = c(3, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2)

> plotFunc <- function(x, y, ...) {
+     vpPlot(x, y, las = 1, ylab = "Body temperature", pch = 21, 
+         col = "#00000099", bg = "#00000033", . .... [TRUNCATED] 

> plotFunc(x, y, main = "Quasirandom")

> plotFunc(x, y, offsetXArgs = list(method = "pseudo"), 
+     main = "Pseudorandom")

> plotFunc(x, y, offsetXArgs = list(method = "maxout"), 
+     main = "Max outside")

> beeInput <- split(y, x)

> beeswarm(beeInput, las = 1, ylab = "Body temperature", 
+     main = "Beeswarm", pch = 21, col = "#00000099", bg = "#00000033")

> addMeanLines(x, y)

> plotFunc(x, y, offsetXArgs = list(method = "tukey"), 
+     main = "Tukey")

> y <- as.vector(EuStockMarkets)

> x <- rep(colnames(EuStockMarkets), each = nrow(EuStockMarkets))

> par(mfrow = c(3, 2), mar = c(4, 4.3, 1.2, 0.5), mgp = c(3.3, 
+     0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2, 
+     las = 1)

> plotFunc <- function(x, y, ...) {
+     vpPlot(x, y, ylab = "Price", cex = 0.7, cex.axis = 0.7, mgp = c(2.5, 
+         0.75, 0), tcl = -0.4, pch =  .... [TRUNCATED] 

> plotFunc(x, y, main = "Quasirandom")

> plotFunc(x, y, offsetXArgs = list(method = "pseudo"), 
+     main = "Pseudorandom")

> plotFunc(x, y, offsetXArgs = list(method = "maxout"), 
+     main = "Max outside")

> beeswarm(EuStockMarkets[, "DAX", drop = FALSE], cex = 0.7, 
+     ylab = "Price", main = "Beeswarm", pch = 21, col = "#00000099", 
+     bg = "#0000 ..." ... [TRUNCATED] 

> plotFunc(x, y, offsetXArgs = list(method = "tukey"), 
+     main = "Tukey")

> ints <- integrations[integrations$nearestGene > 0, 
+     ]

> y <- log10(ints$nearestGene)

> x <- paste(ints$latent, ints$study, sep = "\n")

> tmpPng <- tempfile(fileext = ".png")

> png(tmpPng, height = 2400, width = 1500, res = 300)

> par(mfrow = c(4, 1), mar = c(7.5, 3.5, 1.2, 0.5), 
+     mgp = c(2.5, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2)

> plotFunc <- function(x, y, ...) {
+     cols <- ifelse(grepl("Expressed", x), "#FF000033", "#0000FF33")
+     vpPlot(x, y, las = 2, ylab = "Distance ..." ... [TRUNCATED] 

> plotFunc(x, y, main = "Quasirandom")

> plotFunc(x, y, offsetXArgs = list(method = "pseudo"), 
+     main = "Pseudorandom")

> plotFunc(x, y, offsetXArgs = list(method = "maxout"), 
+     main = "Max outside")

> plotFunc(x, y, offsetXArgs = list(method = "tukey"), 
+     main = "Tukey")

> dev.off()
pdf 
  2 

> select <- sample(1:nrow(ggplot2::diamonds), 3000)

  When sourcing 'methodComparison.R':
Error: there is no package called 'ggplot2'
Execution halted
when running code in 'usageExamples.Rnw'

> options(keep.source = TRUE, width = 60)

> packageInfo <- packageDescription("vipor")

> library(vipor)

> packageKeywords <- "visualization, display, one dimensional, grouped, groups, violin, scatter, points, quasirandom, beeswarm, van der Corput"

> library(vipor)

> set.seed(12345)

> n <- 100

> dat <- rnorm(n * 2)

> labs <- rep(c("a", "b"), n)

> vpPlot(labs, dat)

> vpPlot(labs, dat, las = 1, ylab = "Data", col = rep(1:2, 
+     n))

> abline(h = 0, lty = 2)

> labs2 <- factor(labs, levels = c("b", "a"))

> vpPlot(labs2, dat, las = 1, ylab = "Data", col = rep(1:2, 
+     n))

> abline(h = 0, lty = 2)

> offsets <- offsetX(dat, labs)

> head(offsets, 4)
[1] -0.18939738  0.10387013  0.28854590  0.01104955

> xPos <- vpPlot(labs, dat)

> head(xPos, 4)
[1] 0.8106026 2.1038701 1.2885459 2.0110496

> xPos2 <- rep(1:2, n) + offsets

> head(xPos2, 4)
[1] 0.8106026 2.1038701 1.2885459 2.0110496

> all(xPos == xPos2)
[1] TRUE

> dat <- list(Normal = rnorm(50), `Dense normal` = rnorm(500), 
+     Bimodal = c(rnorm(100), rnorm(100, 5)), Extremes = rcauchy(100))

> par(mfrow = c(4, 1), mar = c(2.5, 3.1, 1.2, 0.5), 
+     mgp = c(2.1, 0.75, 0), cex.axis = 1.2, cex.lab = 1.2, cex.main = 1.2)

> dummy <- sapply(names(dat), function(label) {
+     y <- dat[[label]]
+     offsets <- list(defaults = offsetX(y), `adjust=2` = offsetX(y, 
+        .... [TRUNCATED] 

> dat <- list(`10 points` = rnorm(10), `50 points` = rnorm(50, 
+     2), `200 points` = c(rnorm(400), rnorm(100, 5)), `5000 points` = rnorm(5000, 
+  .... [TRUNCATED] 

> labs <- rep(names(dat), sapply(dat, length))

> labs <- factor(labs, levels = unique(labs))

> vpPlot(labs, unlist(dat), offsetXArgs = list(varwidth = TRUE), 
+     las = 1, ylab = "Value", col = "#00000066", bg = "#00000022", 
+     pch = 21)

> y <- c(beaver1$temp, beaver2$temp)

> x <- rep(c("Beaver 1", "Beaver 2"), c(nrow(beaver1), 
+     nrow(beaver2)))

> vpPlot(x, y, las = 1, ylab = "Body temperature", pch = 21, 
+     col = "#00000099", bg = "#00000033")

> ints <- integrations[integrations$nearestGene > 0, 
+     ]

> y <- log(ints$nearestGene)

> x <- as.factor(paste(ints$study, ints$latent))

> activeCols <- c(Expressed = "#FF000033", Unexpressed = "#0000FF33")

> cols <- activeCols[ints$latent]

> par(mar = c(4, 7, 0.1, 0.1))

> vpPlot(x, y, las = 2, ylab = "Log distance to gene", 
+     xaxt = "n", pch = 21, col = cols, bg = cols, cex = 0.7)

> uniqX <- levels(x)

> prettyX <- tapply(1:length(uniqX), sub("(Une|E)xpressed$", 
+     "", uniqX), mean)

> axis(1, prettyX, names(prettyX), las = 2)

> legend(grconvertX(0.01, from = "ndc"), grconvertY(0.15, 
+     from = "ndc"), names(activeCols), pch = 21, col = cols, pt.bg = activeCols, 
+     xp .... [TRUNCATED] 

> library(ggbeeswarm)

  When sourcing 'usageExamples.R':
Error: there is no package called 'ggbeeswarm'
Execution halted

  'methodComparison.Rnw'... failed
  'usageExamples.Rnw'... failed