sample_n_matrix: dplyr like sample_n for a matrix

Description Usage Arguments Value

Description

dplyr like sample_n for a matrix

Usage

1
sample_n_matrix(mat, n, replace = FALSE, weight = NULL)

Arguments

mat

A matrix

n

Number of rows to sample

replace

See arguments for 'base::sample'

weight

See arguments for 'base::sample'

Value

A matrix library("magrittr") mat <- matrix(1:1e4, ncol = 10) mat


talegari/sidekicks documentation built on May 30, 2019, 8:40 a.m.