Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.cluster

Coerce an Object to a Cluster Object


Description

Coerce an Object to a Cluster Object

Usage

as.cluster(x, ...)

## S3 method for class 'cluster'
as.cluster(x, ...)

## S3 method for class 'list'
as.cluster(x, ...)

## S3 method for class 'SOCKnode'
as.cluster(x, ...)

## S3 method for class 'SOCK0node'
as.cluster(x, ...)

## S3 method for class 'cluster'
c(..., recursive = FALSE)

Arguments

x

An object to be coerced.

...

Additional arguments passed to the underlying coercion method. For c(...), the clusters and cluster nodes to be combined.

recursive

Not used.

Value

An object of class cluster.

c(...) combine multiple clusters and / or cluster nodes into one cluster returned as an of class cluster. A warning will be produced if there are duplicated nodes in the resulting cluster.

Examples

options(parallelly.debug = TRUE)

cl1 <- makeClusterPSOCK(2, dryrun = TRUE)
cl2 <- makeClusterPSOCK(c("n1", "server.remote.org"), dryrun = TRUE)
cl <- c(cl1, cl2)
print(cl)

parallelly

Enhancing the 'parallel' Package

v1.25.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.