% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simulation.R \name{replicateByGroup} \alias{replicateByGroup} \title{Replicate rows of a data frame by group} \usage{ replicateByGroup(df, group_var, rep_list) } \arguments{ \item{df}{Data frame to replicate} \item{group_var}{Name of the grouping variable in the data frame} \item{rep_list}{Vector of replication counts for each group} } \value{ Data frame with replicated rows } \description{ Replicates the rows of a data frame based on a grouping variable and replication counts for each group. } \examples{ df <- data.frame(group = c("A", "B"), value = c(1, 2)) replicateByGroup(df, "group", c(2, 3)) }