View source: R/cluster_collect.R
cluster_collect | R Documentation |
Collect pairs from cluster nodes
cluster_collect(pairs, select = NULL, clear = FALSE)
pairs |
an object or type |
select |
the name of a logical column that is used to select the pairs that will be collected |
clear |
remove the pairs from the cluster nodes |
Returns an object of type pairs
which is a data.table
. This
object can be used as a regular (non-cluster) set of pairs
library(parallel)
data("linkexample1", "linkexample2")
cl <- makeCluster(2)
pairs <- cluster_pair(cl, linkexample1, linkexample2)
local_pairs <- cluster_collect(pairs, clear = FALSE)
compare_pairs(pairs, c("lastname", "firstname", "address", "sex"))
model <- problink_em(~ lastname + firstname + address + sex, data = pairs)
predict(model, pairs, type = "mpost", add = TRUE, binary = TRUE)
# Select pairs with a mpost > 0.5
select_threshold(pairs, "selected", "mpost", 0.5)
# Collect the selected pairs
local_pairs <- cluster_collect(pairs, "selected")
stopCluster(cl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.