R/phyloFcluster.R

Defines functions phyloFcluster

Documented in phyloFcluster

#' Produces cluster object with necessary libraries to perform phylofactorization
#' @export
#' @param ncores number of cores
#' @param ... optional input arguments for \code{\link{makeCluster}}

phyloFcluster <- function(ncores=2,...){
  #creates cluster with all the necessary packages and functions to use these functions in parallel
  cl <- parallel::makeCluster(ncores,...)
  parallel::clusterEvalQ(cl,{library(phylofactor)})
  return(cl)
}
reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.