man-roxygen/assertions_generic.R

#' @title assert/check/test/<%=property%>
#'
#' @description Validation checks to test if <%=check%>.
#'
#' @param object object to test
#' @param errormsg error message to overwrite default if check fails
#'
#' @return If check passes then `assert` returns `object` invisibly and `test`/`check`
#' return `TRUE`. If check fails, `assert` stops code with error, `check` returns
#' an error message as string, and `test` returns `FALSE`.
#'
#' @examples
#' test<%=property%>(<%=test1%>)
#' test<%=property%>(<%=test2%>)
xoopR/set6 documentation built on Sept. 2, 2023, 4:45 a.m.