R/ggir2WhatV2.R

Defines functions ggir2WhatV2

Documented in ggir2WhatV2

#' Title
#'
#' @param df 
#' @param currentProject 
#'
#' @return
#' @export
#'
#' @examples
ggir2WhatV2=function(df,currentProject){
  cat("\nComputing 'WHAT' intervals using GGIR epochs\n")
  #pb <- progress_estimated(nrow(df))
  pb <- progress::progress_bar$new(format = ":MSG [:bar] :current/:total (:percent) :eta", total = nrow(df))
  ggir2IntervalWithProgress <- function(base,RAW,...){
    #pb$tick()$print()
    pb$tick(tokens = list(MSG = RAW))
    ggir2IntervalV2(currentProject,base,RAW,...)
  }
  
  pmap(df,ggir2IntervalWithProgress)
}
fjbaron/accelerator documentation built on July 7, 2023, 6:52 p.m.