Description Usage Arguments Note Examples
Quick trelliscope display for data frame-like inputs
1 2 |
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 |
If you don't have a vdb connection set up (see vdbConn
), a temporary one will be created and used, and you can think of the plot as disposable. If you would like the plot to persist, set up a vdb connection. Likewise, if you don't supply name
and group
, the plot will be stored under defaults "qtrellis_plot" and "__qtrellis", and a subsequent call will cause the previous display with this name and group to be replaced. Therefore, if you want your display to persist, make sure a vdb connection has been set up prior to calling this function, and give it a unique name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.