View source: R/profoundSegimFix.R
profoundMergeSegID | R Documentation |
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.
profoundMergeSegID(segID_merge)
profoundZapSegID(segID, segID_merge)
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. |
Merges complex lists of desired merging to their simplest form (profoundMergeSegID
). Zaps unwanted list entries easily (profoundZapSegID
).
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.
Aaron Robotham
profoundSegimFix
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.