resample_df: Function to resample a dataframe that takes into account...

View source: R/analyze.r

resample_dfR Documentation

Function to resample a dataframe that takes into account user-specified weights and clusters.

Description

This function allows you to resample a dataframe for analysis.

Usage

resample_df(data, n = 1000, cluster = NULL, weights = NULL)

Arguments

data

Dataframe with variables to be resampled

n

Number of resamples to generate.

cluster

Formula specifying the variable in data that identifies clusters within the data.

weights

Vector of weights to use.

Examples

resample_df(data, n = 2000, cluster = ~ cluster, weights = data$.weights)


jacobaro/danalyze documentation built on Oct. 20, 2022, 8:09 a.m.