The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
require_pattern(),
require_nchar() and require_nonempty().require_ncol_min(),
require_ncol_matches(), require_dim(),
require_names() (modes "identical",
"subset", "superset",
"permutation"), require_unique_names() and
require_sorted(). require_has_cols() is the
"superset" case of the same comparison. A matrix is checked
with require_class("matrix").require_contains(),
require_set_equal(), require_levels() and
require_disjoint(). require_one_of() is the
subset test for vectors.require_file_exists(),
require_dir_exists(), require_readable() and
require_writable().require_function() checks callback arguments by
argument names or call signature. require_custom() now
requires a function callable with three positional arguments.expect_valid() and
expect_invalid().steps() returns the label, context dependencies and
parameters of every step as a data.frame.require_nrow_min() and
require_nrow_matches() also accept matrices.require_integer() rejects Inf and
-Inf in both modes.ref$id
as a context dependency, nor .value and
.name.require_unique() reports
must contain unique values and
require_one_of() reports
must be one of: ....require_col(col, validator) lifts any validator
onto a data.frame column with path-aware errors
(newdata$age: ...). It replaces
require_col_numeric(),
require_col_character(), require_col_between()
and require_col_one_of(), which are removed: write
require_col("x", restrict("x") |> require_numeric())
instead.require_each() and require_fields()
validate every element, or named fields, of a list
(layers[[2]], opts$alpha).allow_null() marks an optional argument:
NULL passes, otherwise all steps apply.require_valid() includes another validator’s steps
and require_any() accepts a value that satisfies at least
one alternative.require_between() now accepts Date,
POSIXct, difftime and ordered factor values
and bounds.require_nrow_min() and
require_nrow_matches() fail with a path-aware error on
non-data.frame input, and require_length_matches() /
require_nrow_matches() reject formulas that do not evaluate
to a single non-NA number..on_fail = "all", a type or structure failure on a
path is reported once instead of once per step. The aggregated message
lists at most 20 failures; the full list stays in
$failures.require_class(): assert any class
(e.g. factor, Date, POSIXct,
fitted-model objects) through one verb, with exact for a
strict first-class match..on_fail = "all": run every step and
report all violations in one aggregated error instead of stopping at the
first.is_valid() (logical predicate)
and validation_errors() (character vector of failure
messages, empty when the value passes).require_length_matches(),
require_nrow_matches()) now resolve non-base functions such
as median(), sd(), and package exports. Data
names are still taken only from explicit context.fail() now signals a structured
restrictR_failure condition carrying path,
found, and at, so failures can be collected
and inspected programmatically.require_scalar(),
require_not_null(), require_unique(),
require_named().require_positive() and
require_negative() with strict argument
(non-strict by default).require_integer() gains a strict argument.
Default (strict = FALSE) accepts any numeric whole number;
strict = TRUE requires the R integer
type.fail() so custom steps produce canonical
structured errors.as_contract_text() now capitalizes every sentence, not
just the first.require_between() and require_one_of()
omit the At: line for scalar values where it adds no
information.fail().restrict() for building composable
validators.require_df(),
require_numeric(), require_character(),
require_length(), require_length_matches(),
require_nrow_min(), require_has_cols(),
require_col_numeric(),
require_col_character(), require_col_range(),
require_range(), require_one_of().newdata$x2 must be numeric).as_contract_text() for roxygen-compatible
documentation.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.