c.source: Source function for cluster parallel

Description Usage Arguments Examples

Description

Wrapper function for c.call(source, FILE).

Usage

1
2
3
## S3 method for class 'source'
c(..., push = TRUE, clear = FALSE, on.main = TRUE,
  on.worker = TRUE)

Arguments

...

string objects containing paths to files to source.

push

logical of whether or not to push the export list, defaults to TRUE

clear

logical of whether or not to erase the export list and add the included options to it, defaults to FALSE

on.main

logical set to TRUE to source to the main process in a cluster, defaults to TRUE, no effect for FORK

on.worker

logical set to TRUE to source to the Worker process in a cluster, defaults to TRUE, no effect for FORK

Examples

1
2
3
4
5
FILE <- "/home/user/useful.R"
c.source(FILE, push=FALSE)                    # adds object 'vec' to list of things to export, but doesn't export it
c.source("/home/user/useful.R", push=FALSE)   # adds object 'vec' to list of things to export, but doesn't export it
c.source(push=T)                              # export all objects in the to.export list
c.source("vec")                               # add "vec" to the to.export list, then export all items in list

bamonroe/ctools documentation built on May 11, 2019, 6:19 p.m.