Description Usage Arguments See Also Examples
List displays in a VDB.
1 | listDisplays(conn = getOption("vdbConn"))
|
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 |
Other display_manipulation: cleanupDisplays
,
getDisplay
, removeDisplay
,
restoreDisplay
, updateDisplay
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | library(lattice)
library(ggplot2)
d <- divide(iris, by = "Species")
# two panel functions
p1 <- function(x)
xyplot(Sepal.Length ~ Sepal.Width, data = x)
p2 <- function(x)
qplot(Sepal.Width, Sepal.Length, data = x)
# try them both out on a subset
p1(d[[1]]$value)
p2(d[[1]]$value)
vdbConn(tempfile(), autoYes = TRUE)
makeDisplay(d, name = "lattice", panelFn = p1)
makeDisplay(d, name = "ggplot2", panelFn = p2)
# look at a list of the displays in this vdb:
listDisplays()
# get a the lattice display object
lobj <- getDisplay("lattice")
# look at one of the fields of the display object
lobj$desc
# we forgot to provide a description in makeDisplay
# let's add one without recreating it
updateDisplay("lattice", desc = "lattice plot of sepal width vs. length")
# let's see if it was updated
lobj <- getDisplay("lattice")
lobj$desc
# overwrite one of the displays
makeDisplay(d, name = "ggplot2", panelFn = function(x) qplot(1, 1))
# notice that there is a backup display:
list.files(file.path(getVdbPath(), "displays", "common"))
# oops - let's restore the previous one
restoreDisplay(name = "ggplot2", autoYes = TRUE)
# suppose we want to get rid of the lattice display
removeDisplay("lattice", autoYes = TRUE)
# check the list of displays
listDisplays()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.