R/replicate_data.R

Defines functions replicate_data

Documented in replicate_data

#####################################################################
#*copying the data set 100 times;
#' @export
#' @import formattable
#' @import mefa

replicate_data <- function(start, end, Before, After, data) {
  mu <- seq(start * 100, end * 100, by = (end - start))
  mu <- rep(mu, each = nrow(data))
  
  before <- data[[Before]] - mu / 100
  after <- data[[After]]
  
  mee_chua <- data.frame(mu = mu, before = before, after = after)
  return(mee_chua)
}

Try the regtomean package in your browser

Any scripts or data that you put into this service are public.

regtomean documentation built on April 4, 2025, 2:08 a.m.