Strict behaviour for functions with special scalar behaviour
Source:R/shim-scalar.R
strict_sample.Rd
sample()
and diag()
behave differently depending on whether their
first argument is a scalar or a function. These shims throw an error
when given a scalar to force you to pick a safer alternative.
Usage
strict_sample(x, size = length(x), replace = FALSE, prob = NULL)
strict_diag(x = 1, nrow, ncol)