SHARE
TWEET

Untitled

tester11235 May 22nd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ################################### TestFunction #############################################
  2.  
  3. library(tidyr)
  4. library(imputeSample)
  5. splitISample <- function(myData, filter, weight_aggregate, weight_col,iterasi, sample_flag = 1){
  6.   weight_agg <- weight_aggregate
  7.   filter = filter
  8.   splitDataFrame <- myData %>% nest(-KODE_PROV, -KODE_KAB)
  9.   temp <- list()
  10.   for (i in dim(splitDataFrame)[1]) {
  11.     temp[[i]] <- imputation_sample(as.data.frame(splitDataFrame$data[[i]]), filters = my_filter, weight_aggregate = weight_aggregate,  weight_col = Weight_R, iter = 50)
  12.   }
  13.   outputData = data.frame()
  14.   for (i in 1:length(temp)) {
  15.     outputData <- rbind(outputData, temp[[i]])
  16.   }
  17.   return(outputData)
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top