trelliscope (version 0.9.7)

syncLocalData: Sync localDisk objects to VDB

Description

Sync localDisk data that is used for VDB displays located throughout the system to a 'data' directory inside the VDB - useful for collecting data before syncing with a web server, and used inside of webSync and deployVDB.

Usage

syncLocalData(vdbConn = getOption("vdbConn"), rsync = NULL)

Arguments

vdbConn
VDB connection settings
rsync
location of rsync binary

See Also

webSync, webConn

Examples

Run this code
library(ggplot2)

vdbConn(tempfile(), autoYes = TRUE)

# divide iris data and store it as a local disk connection
d <- divide(iris, by = "Species",
  output = localDiskConn(tempfile(), autoYes = TRUE))

# make a simple display using this data
makeDisplay(d, name = "sl_vs_sw",
  panelFn = function(x)
    qplot(Sepal.Width, Sepal.Length, data = x))

# look at files in our VDB directory
list.files(getVdbPath())
# since the data for our display resides in a different path
# if we try to share this file with someone on another machine
# the data will not be found

# sync any local data objects used in any display to be
# centralized with the VDB directory, making it portable
## Not run: 
# syncLocalData() # requires rsync
# ## End(Not run)

# now there is a "data" directory that holds all local disk data
list.files(getVdbPath())

Run the code above in your browser using DataCamp Workspace