R/progress.R

Defines functions progress

progress <- function(i, k, numTicks){
  
  if(i == 1) numTicks <- 0
  
  if(numTicks == 0) cat("|-")
  
  while(i > numTicks*(k/40)){
    
    cat("-")
    if(numTicks == 10) cat("(25%)")
    if(numTicks == 20) cat("(50%)")
    if(numTicks == 30) cat("(75%)")
    numTicks <- numTicks + 1
  }
  
  if(i == k) cat("-|\n")
  
  return(numTicks)
}

Try the ALDEx2 package in your browser

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

ALDEx2 documentation built on Nov. 8, 2020, 8:05 p.m.