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

View source: R/stopifnot.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/nwfscSurvey documentation built on Nov. 12, 2024, 8:14 p.m.