clusterComputation is a function to cluster the different distances from the distance
function together.
To speed up the code the function is using parallel computation.
The function first counts the number of columns of the distanceMatrixDF to determine the number of repetitions.
It then determine the number of cores in the computer and builds a cluster on each core with respect to one free core.
After this the function exports cluster
, distanceMatrixDF
, numberOfColumns
, emptyClassMeteroites
and classMeteroites
to each core.
The function uses parSapply to parallel the computation.
The function returns the classDF
dat frame with the classes and the number of meteroites in each category and stops automatically the cluster.
1 |
No |
additional arguments are needed |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.