sample_frac_group: Sample by a proportion of a grouping variable

View source: R/sample_frac_group.R

sample_frac_groupR Documentation

Sample by a proportion of a grouping variable

Description

Sample by a proportion of a grouping variable

Usage

sample_frac_group(data, proportion = 0.1, id = id_physician_npi, seed = 1234)

Arguments

data

A data frame.

proportion

A value between 0 and 1.

id

The bare column name containing the grouping variable whose labels you wish to sample.

Details

when the data is too big, we sample the data (usually

Value

A filtered data frame containing roughly the proportion of id labels provided.


UMCSTaR/medicareAnalytics documentation built on July 13, 2022, 11:33 p.m.