gdiffSession | R Documentation |
Define the R session to be used for generating graphical output files.
There are several predefined sessions, e.g.,
currentSession()
, and further sessions can be defined
using gdiffSession()
.
currentSession(libPaths=NULL)
localSession(libPaths=NULL,
Rpath=file.path(R.home("bin"), "Rscript"),
...)
remoteSession(remote, ...)
## S3 method for class 'character'
remoteSession(remote, libPaths=NULL, Rpath="Rscript", ...)
## S3 method for class 'cluster'
remoteSession(remote, libPaths=NULL, user=NULL, ...)
dockerSession(image, volumes=NULL, env=NULL, network="bridge",
libPaths=NULL, Rpath="Rscript", ...)
gdiffSession(class, ...)
gdiffGenerateOutput(codeFun, dir, device, clean, ncpu)
libPaths |
One or more paths to installed R packages. |
Rpath |
A path to an |
remote |
Either the name of a host or a cluster object (as produced by
|
user |
A user name. |
image |
The name of a Docker image. |
volumes |
A character vector of volumes to mount on the container (of the
form |
env |
A character vector of environment variable settings for the
container
(of the form |
network |
A character vector describing the network connection for the container. |
class |
A unique class for a new type of R session. |
... |
Further arguments for future methods. |
codeFun, dir, device, clean, ncpu |
Arguments passed to |
When defining a new session, gdiffSession()
is just used
to establish a new class. The important thing to do is to provide a
generateOutput
method for that class. Typically, this
method will call gdiffGenerateOutput()
.
A "gdiffSession"
object, which may be used as the session
argument to gdiff
.
Paul Murrell
gdiff
.
f <- function() plot(1)
gdiff(f, session=currentSession(),
controlDir=file.path(tempdir(), "Control"),
testDir=file.path(tempdir(), "Test"),
compareDir=file.path(tempdir(), "Compare"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.