File: inflate.R

package info (click to toggle)
r-cran-memisc 0.99.31.8.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,136 kB
  • sloc: ansic: 5,117; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## 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()