View a Display or Run Shiny Display Viewer

Share:

Description

View a display or run Shiny display viewer

Usage

1
2
3
view(name = NULL, group = NULL, state = NULL, openBrowser = TRUE,
  conn = getOption("vdbConn"), port = getOption("trelliscopePort"),
  copyFiles = TRUE)

Arguments

name, group

optional parameters to load the viewer with a pre-specified display - if not specified, the viewer will launch with a list to choose from

state

an optional list of state variables to set the default viewing state for layout, sorting, filtering, and labels (see details)

openBrowser

should the browser be automatically launched?

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

port

what port to use for the viewer - if not specified, will look for "trelliscopePort" set in R's global options, followed by a search for a system-level environment variable "TRELLISCOPE_PORT". If none of these are defined, a random port assigned provided by shiny will be used.

copyFiles

should updated viewer files be copied over to VDB directory?

Examples

 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
library(ggplot2)

vdbConn(tempfile(), autoYes = TRUE)

# make a simple display
d <- divide(iris, by = "Species")
makeDisplay(d, name = "sl_vs_sw",
  panelFn = function(x)
    qplot(Sepal.Width, Sepal.Length, data = x))

## Not run: 
# open viewer with default providing list of displays to veiw
view()

# open viewer on port 8100
view(port = 8100)

# make port 8100 the default port for all future calls to view()
options(trelliscopePort = 8100)

# open viewer directly to "sl_vs_sw"
view(name = "sl_vs_sw")

# open viewer directly to "sl_vs_sw" and set intial state
view(state = stateSpec(
  name = "sl_vs_sw",
  layout = list(nrow = 1, ncol = 3),
  labels = c("panelKey", "Species")))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.