spatial.tools (version 1.6.0)

sfQuickInit: Quickly initializes a parallel cluster and registers it with foreach.

Description

Quickly initializes a parallel cluster and registers it with foreach.

Usage

sfQuickInit(cpus, methods = FALSE, ...)

Arguments

cpus

Number of cpus. Will default to the max available cpus.

methods

Logical. Load the methods package? (if FALSE, faster startup). Default=FALSE.

...

parameters to pass to sfInit()

Details

(Even more) quickly start a parallel cluster with half of available cpus, parallel = TRUE, and type = "SOCK" and registers it with foreach.

Examples

Run this code
# NOT RUN {
sfQuickInit(cpus=2)
sfQuickStop()
# }

Run the code above in your browser using DataCamp Workspace