has_required_lengths: Check Required Length for a List of Objects

View source: R/fe_stand_helpers_validation.R

has_required_lengthsR Documentation

Check Required Length for a List of Objects

Description

Check Required Length for a List of Objects

Usage

has_required_lengths(x, names_and_rqmts)

Arguments

x

list of objects to be checked

names_and_rqmts

a tibble that relates object names and the length they are required to have. Must have two columns, name (i.e. the object name, character), and required (i.e. the required length, integer)

Value

A list with two elements: 1) rqmt_ok which is TRUE if the requirement is fulfilled and FALSE otherwise; 2) err_message, the body of an error message to be used by the calling function (mentions all problematic elements)


ForestElementsR documentation built on April 3, 2025, 7:47 p.m.