profoundZapSegID: Zap Elements of segID_merge

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/profoundSegim.R

Description

This function allows for safe 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

1
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

Zaps unwanted list entries easily.

Value

Output is the zapped version of segID_merge:

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

Author(s)

Aaron Robotham

See Also

profoundSegimFix

Examples

1
2
3
4
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

ProFound documentation built on Jan. 8, 2021, 5:37 p.m.