merge_pairs: Merge two sets of pairs into one

View source: R/merge_pairs.R

merge_pairs.cluster_pairsR Documentation

Merge two sets of pairs into one

Description

Merge two sets of pairs into one

Usage

## S3 method for class 'cluster_pairs'
merge_pairs(
  pairs1,
  pairs2,
  name = paste(pairs1$name, pairs2$name, sep = "+"),
  ...
)

## S3 method for class 'cluster_pairs'
rbind(...)

merge_pairs(pairs1, pairs2, ...)

## S3 method for class 'pairs'
merge_pairs(pairs1, pairs2, ...)

## S3 method for class 'pairs'
rbind(...)

Arguments

pairs1

the first set of pairs

pairs2

the second set of pairs

name

name of new object to assign the pairs to on the cluster nodes.

...

for rbind the pairs or cluster_pairs objects the need to be combined; for merge_pairs these are passed on to other methods.

Details

The function will give an error when the two sets of pairs have different values for attr(pairs1, "x") and attr(pairs1, "y"). When these attributes are missing the code will not generate an error; the user is then responsible for ensuring that the indices in pairs1 and pairs2 refer to the same datasets.

Value

Returns a pairs or cluster_pairs object where both sets of pairs are combined. Duplicate pairs are removed.

In case of merge_pairs.cluster_pairs, merge_pairs.pairs is called on each cluster node and the resulting pairs are assigned to name in the environment reclin_env.


reclin2 documentation built on May 29, 2024, 4:21 a.m.