checkMinOverlap: Check Minimum Overlap Between Two Vectors

View source: R/CodeAndRoll2.R

checkMinOverlapR Documentation

Check Minimum Overlap Between Two Vectors

Description

Checks if the overlap between two character vectors is at least a specified percentage of the shorter vector. Stops execution with an error if the condition is not met.

Usage

checkMinOverlap(x, y, min_overlap = 0.2, stop_it = TRUE, verbose = TRUE)

Arguments

x

First character vector.

y

Second character vector.

min_overlap

Minimum required overlap as a fraction of the shorter vector's length.

stop_it

Use stop(), else warning()

verbose

verbose

Value

Invisible TRUE if the overlap is sufficient, otherwise stops with an error.


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.