excludes_advanced: Check if an object does not contain prohibited elements

View source: R/set_operations.R

excludes_advancedR Documentation

Check if an object does not contain prohibited elements

Description

This function checks that x does not include any of the illegal elements. x must be the same type as illegal. Factors are treated as character vectors.

Usage

excludes_advanced(x, illegal)

Arguments

x

An object to check

illegal

The prohibited elements to check for

Value

Returns TRUE if x is the same type as illegal and x does not include any of the illegal elements. Otherwise returns a string representing the appropriate error message to display


assertions documentation built on April 3, 2025, 5:52 p.m.