trelliscope (version 0.9.7)

qtrellis: Quick trelliscope display for data frame-like inputs

Description

Quick trelliscope display for data frame-like inputs

Usage

qtrellis(x, panel = NULL, cog = NULL, by = NULL, layout = c(1, 1), conn = getOption("vdbConn"), ...)

Arguments

x
either a data frame
panel
a function taking one argument (which will be a subset of the input data frame) and returning a plot
cog
an optional cognostics funtion to be applied to each subset
by
if the input is a data frame, a character vector of column names to split the data by
layout
a vector indicating the number of rows and columns to arrange the panels in by default
conn
VDB connection info, typically stored in options("vdbConn") at the beginning of a session, and not necessary to specify here if a valid "vdbConn" object exists or if you would like to use a temporary one for this display
...
parameters passed to makeDisplay - most importantly name, group (see note below), width, and height

Examples

Run this code
## Not run: 
# panel <- function(x)
#   xyplot(Sepal.Width ~ Sepal.Length, data = x)
# 
# p <- datadr::divide(iris, by = "Species") %>%
#   qtrellis(panel, layout = c(1, 3))
# p
# 
# # data frame input (need to specify 'by')
# iris %>% qtrellis(panel, by = "Species")
# 
# # dplyr grouped tbl input
# library(dplyr)
# p <- iris %>%
#   group_by(Species) %>%
#   qtrellis(panel, layout = c(1, 3))
# p
# ## End(Not run)

Run the code above in your browser using DataLab