Description Usage Arguments Value
dplyr like sample_n for a matrix
1 | sample_n_matrix(mat, n, replace = FALSE, weight = NULL)
|
mat |
A matrix |
n |
Number of rows to sample |
replace |
See arguments for 'base::sample' |
weight |
See arguments for 'base::sample' |
A matrix library("magrittr") mat <- matrix(1:1e4, ncol = 10) mat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.