Skip to content

Commit

Permalink
add @export for stopifnot #161
Browse files Browse the repository at this point in the history
  • Loading branch information
chantelwetzel-noaa committed Nov 5, 2024
1 parent e393f4e commit 7ff7b99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export(pull_catch)
export(pull_gemm)
export(pull_haul)
export(pull_spp)
export(stopifnotcolumn)
export(wh_plot_proportion)
import(chron)
import(cli)
Expand Down
2 changes: 2 additions & 0 deletions R/stopifnot.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#' @return `TRUE` is invisibly returned if the column name is found and
#' an informative [stop] call is initiated if the column is not present.
#'
#' @export
#'
stopifnotcolumn <- function(data, string) {
if (is.na(match(string, colnames(data)))) {
stop(string, " was not found in your data frame.")
Expand Down

0 comments on commit 7ff7b99

Please sign in to comment.