samplefrac: Sample a fraction of rows without replacement

View source: R/primitives.R

samplefracR Documentation

Sample a fraction of rows without replacement

Description

Sample a fraction of rows without replacement

Usage

samplefrac(data, frac, by = NULL)

Arguments

data

A data.frame.

frac

Fraction of rows to sample.

by

Optional character vector of grouping columns; sample frac of each group (rounded up). Sampled rows are returned in their original order.

Value

A random sample of rows.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.