Learn R Programming

rock (version 0.5.4)

match_consecutive_delimiters: Match the corresponding indices of (YAML) delimiters in a sequantial list

Description

Match the corresponding indices of (YAML) delimiters in a sequantial list

Usage

match_consecutive_delimiters(
  x,
  errorOnInvalidX = FALSE,
  errorOnOdd = FALSE,
  onOddIgnoreFirst = FALSE
)

Arguments

x

The vector with delimiter indices

errorOnInvalidX

Whether to return NA (if FALSE) or throw an error (if TRUE) when x is NULL, NA, or has less than 2 elements.

errorOnOdd

Whether to throw an error if the number of delimiter indices is odd.

onOddIgnoreFirst

If the number of delimiter indices is odd and no error is thrown, whether to ignore the first (TRUE) or the last (FALSE) delimiter.