R/inflate.R

Defines functions inflate

## Not exported yet ...

inflate <- function(df,w){
  w <- eval(substitute(w),df,parent.frame())
  i <- seq(nrow(df))
  i <- rep(i,as.integer(w))
  df[i,]
}


# test.inflate <- function(){
#   testdata <- data.frame(x=c(1,2,3),y=c(4,5,6),weights=c(4,8,12))
#   print(testdata)
#   print(
#     inflate(testdata,weights)
#     )
# }
# 
# test.expand()

Try the memisc package in your browser

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

memisc documentation built on March 31, 2023, 7:29 p.m.