strict_sample | R Documentation |
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.
strict_sample(x, size = length(x), replace = FALSE, prob = NULL)
strict_diag(x = 1, nrow, ncol)
x , size , replace , prob , nrow , ncol |
Passed on to |
lax({
sample(5:3)
sample(5:4)
sample(5:5)
diag(5:3)
diag(5:4)
diag(5:5)
})
## Not run:
sample(5:5)
diag(5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.