Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


gdiff (version 0.2-5)

gdiffSession: Define an R Session for Generating Output

Description

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().

Usage

currentSession(libPaths=NULL)
localSession(libPaths=NULL,
             Rpath=file.path(R.home("bin"), "Rscript"),
             ...)
remoteSession(remote, ...)
# S3 method for character
remoteSession(remote, libPaths=NULL, Rpath="Rscript", ...)
# S3 method for 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)

Value

A "gdiffSession" object, which may be used as the session

argument to gdiff.

Arguments

libPaths

One or more paths to installed R packages.

Rpath

A path to an Rscript binary.

remote

Either the name of a host or a cluster object (as produced by parallel::makeCluster()).

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 /path/on/host:/path/on/container/).

env

A character vector of environment variable settings for the container (of the form VAR=value).

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 generateOutput methods that can be passed on to gdiffGenerateOutput.

Author

Paul Murrell

Details

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().

See Also

gdiff.

Examples

Run this code
f <- function() plot(1)
# \donttest{
gdiff(f, session=currentSession(),
      controlDir=file.path(tempdir(), "Control"),
      testDir=file.path(tempdir(), "Test"),
      compareDir=file.path(tempdir(), "Compare"))
# }

Run the code above in your browser using DataLab