c.sourceCpp: SourceCPP function for cluster parallel

Description Usage Arguments Examples

Description

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

Usage

1
2
3
## S3 method for class 'sourceCpp'
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.cpp"
c.sourceCpp(FILE, push=FALSE)                    # adds files in FILE to list of things to export, but doesn't export it
c.sourceCpp("/home/user/useful.cpp", push=FALSE) # adds files in FILE to list of things to export, but doesn't export it
c.sourceCpp(push=T)                              # source all files in the in the 'sourceCpp' list
c.sourceCpp("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.