setLengths and elementLengths should offer the possibility of ignoring duplicated relationships between the same element and set.
If multiple relationships between the same element and set with different relation metadata are not duplicated, then setLengths and elementLengths should do the deduplication themselves.
If they are duplicated, then setLengths and elementLengths should simply call unique on the object before computing the lengths.
Practically, I would add a logical argument setLengths(..., unique=TRUE) (same for elementLengths).
The default argument should probably be TRUE, as the use case of including duplicated relationships is fairly unlikely.
Related to #41
setLengths
andelementLengths
should offer the possibility of ignoring duplicated relationships between the same element and set.If multiple relationships between the same element and set with different relation metadata are not duplicated, then
setLengths
andelementLengths
should do the deduplication themselves. If they are duplicated, thensetLengths
andelementLengths
should simply callunique
on the object before computing the lengths.Practically, I would add a logical argument
setLengths(..., unique=TRUE)
(same forelementLengths
).The default argument should probably be
TRUE
, as the use case of including duplicated relationships is fairly unlikely.