find_seq_incomplete: Check for gaps in numeric sequence by group

View source: R/sequence_checks.R

find_seq_incompleteR Documentation

Check for gaps in numeric sequence by group

Description

Identifies **gaps** only, if the sequence is broken because of a duplication, use duplicheck

Usage

find_seq_incomplete(
  df,
  checkCols = NULL,
  comparison = `==`,
  step = NULL,
  verbose = FALSE
)

Arguments

df

A dataframe

checkCols

A character vector with exactly two strings. The first names the grouping variable, and the second, the accompanying _numeric_ sequence variable.

comparison

A relational operator for the check, with back-ticks.

step

Step to be used in comparison. Defaults to the difference between the first and second elements of the vector.

verbose

Should messages be reported?

Value

If any gaps found, the function returns a data frame with two rows before and one after the gap in the sequence, extracted by group. If no gaps found, NULL invisibly.


AltfunsMA/cptools documentation built on Aug. 7, 2022, 5:44 p.m.