This is mistake. Report this to the package employee.
Here is the code check.cluster:
function (cluster)
{
if (is.null(cluster))
return(TRUE)
if (any(class(cluster) %!in% supported.clusters))
stop("cluster is not a valid cluster object.")
if (!requireNamespace("parallel"))
stop("this function requires the parallel package.")
if (!isClusterRunning(cluster))
stop("the cluster is stopped.")
}
Now, if you look at the class cl:
class(cl)
#[1] "SOCKcluster" "cluster"
Let me reproduce the check:
bnlearn:::supported.clusters
#[1] "MPIcluster" "PVMcluster" "SOCKcluster"
`%!in%` <- function (x, table) {
match(x, table, nomatch = 0L) == 0L
}
any(class(cl) %!in% bnlearn:::supported.clusters)
#[1] TRUE
cluster supported.clusters. , , , .
supported.clusters:
assignInNamespace("supported.clusters",
c("cluster", "MPIcluster",
"PVMcluster", "SOCKcluster"),
"bnlearn")