profoundZapSegID: Zap Elements of segID_merge

View source: R/profoundSegimFix.R

profoundMergeSegIDR Documentation

Zap Elements of segID_merge

Description

This function allows for safe merging or zapping of the segID_merge structure. This is important since it can be tricky to remove elements with logic if you are not an R guru.

Usage

profoundMergeSegID(segID_merge)
profoundZapSegID(segID, segID_merge)

Arguments

segID

Integer vector; segment IDs that you want to zap in segID_merge. All list entries that contain any of segID are entirely removed, so this process is very aggressive!

segID_merge

Integer list; each list element should specify collections of segments to be merged.

Details

Merges complex lists of desired merging to their simplest form (profoundMergeSegID). Zaps unwanted list entries easily (profoundZapSegID).

Value

profoundMergeSegID: Output is the simplified version of segID_merge. This means all potentially quite complex friend-of-friends groups are brought together to form a single segID_merge list item. This means each segID will occur at most 1 time in the structure.

profoundZapSegID: Output is the zapped version of segID_merge.

Author(s)

Aaron Robotham

See Also

profoundSegimFix

Examples

example=list(1:5, 11:15, 21:25, 31:35)

(profoundZapSegID(3, example)) #removes first list entry since 3 appears in that vector
(profoundZapSegID(40, example)) #does nothing, since 40 does not appear anywhere

asgr/ProFound documentation built on Feb. 10, 2024, 9:04 p.m.