creates a closure with a make_call() method that wraps any function call. When the wrapper is used the function call is saved and the calls are counted and the progress is being printed. Use the method set_total() to input the total number of function calls. Based on the total an ETA is estimated and a percentage calculated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
.f = randomForest::randomForest call_cont = make_container_for_function_calls() call_cont$set_total(4) m_wr = call_cont$make_call( .f = .f, formula = disp~., data = mtcars ) #pipe version call_cont = make_container_for_function_calls() call_cont$set_total(5) pl = pipelearner::pipelearner(mtcars) %>% pipelearner::learn_models( models = c( call_cont$make_call ) , formulas = c(disp~.) , .f = c( randomForest::randomForest ) , function_name = 'randomForest' , print_call = c(T) ) %>% pipelearner::learn_cvpairs( pipelearner::crossv_kfold, k = 5 ) %>% pipelearner::learn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.