knitr::opts_chunk$set(echo = TRUE)

build and get the result

library(GetToIt)

magic <- list(list(c(rnorm(20,2,1)), c(rnorm(8,8,1))),
              list(c(rnorm(20,3,1)), c(rnorm(8,7,1))),                   
              list(c(rnorm(20,4,1)), c(rnorm(8,6,1)))) 

#give a name to the boxplot
names(magic) <- c(1:length(magic))

#and pick an order
order= c(1,3,2)

p <- ggBoxPlot(magic, order)

The list ...

head(magic, n = 2)

... back as a dataframe ... :

pander::pandoc.table(head(as.data.frame(p[2]), n = 30))

... to be boxplotted.

p[1]


pterzian/GetToIt documentation built on May 24, 2017, 1:16 p.m.