R/create_progress_bar.R

create_progress_bar = function(rG,num_G,num_q,num_model,models) {
    CCC_equiv <- c("CCC", "CUC", "UCC", "UUC")
    CCU_equiv <- c("CCU", "CUU", "UCU", "UUU")

    # determine length
    if (1 %in% rG) {
        if (any(models %in% CCC_equiv) && any(models %in% CCU_equiv)) {
            max <- num_model * num_q * (num_G - 1) + 2
        } else {
            max <- num_model * num_q * (num_G - 1) + 1
        }
    } else {
        max <- num_model*num_q*num_G
    }

    # create bar object & return
    txtProgressBar(min = 0, max = max, style = 3)
}

Try the mcgfa package in your browser

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

mcgfa documentation built on June 24, 2019, 5:02 p.m.