Learn R Programming

WARDEN (version 0.99.1)

replicate_profiles: Replicate profiles data.frame

Description

Replicate profiles data.frame

Usage

replicate_profiles(
  profiles,
  replications,
  probabilities = NULL,
  replacement = TRUE,
  seed_used = NULL
)

Value

Resampled data.frame of profiles

Arguments

profiles

data.frame of profiles

replications

integer, final number of observations

probabilities

vector of probabilities with the same length as the number of rows of profiles. Does not need to add up to 1 (are reweighted)

replacement

Boolean whether replacement is used

seed_used

Integer with the seed to be used for consistent results

Examples

Run this code
replicate_profiles(profiles=data.frame(id=1:100,age=rnorm(100,60,5)),
replications=200,probabilities=rep(1,100))

Run the code above in your browser using DataLab