stopifnotcolumn: Stop if column name is not present in the data

View source: R/stopifnotcolumn.R

stopifnotcolumnR Documentation

Stop if column name is not present in the data

Description

Similar in function to stopifnot but specific to a column name that you wish to double check if it is present in your data or not.

Usage

stopifnotcolumn(data, string)

Arguments

data

A data frame with column names.

string

A character string that you want to know if it exists in the column names of data.

Value

TRUE is invisibly returned if the column name is found and an informative stop call is initiated if the column is not present.


nwfsc-assess/PacFIN.Utilities documentation built on March 19, 2024, 11:54 p.m.