Error(s) in re-building vignettes:
--- re-building ‘Inbred_Based_Populations.Rmd’ using rmarkdown
--- finished re-building ‘Inbred_Based_Populations.Rmd’

--- re-building ‘Introduction_R.Rmd’ using rmarkdown
--- finished re-building ‘Introduction_R.Rmd’

--- re-building ‘Outcrossing_Populations.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
onemap
 --- call from context --- 
compare_outcross(input.seq = input.seq, n.best = n.best, tol = tol, 
    verbose = verbose)
 --- call from argument --- 
if (class(Ph.Init) == "integer") {
    Ph.Init <- matrix(Ph.Init, nrow = 1)
    Rf.Init <- matrix(Rf.Init, nrow = 1)
}
 --- R stacktrace ---
where 1: compare_outcross(input.seq = input.seq, n.best = n.best, tol = tol, 
    verbose = verbose)
where 2: compare(LG3)
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 10: evaluate::evaluate(...)
where 11: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 12: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 18: process_file(text, output)
where 19: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    output_dir = getwd(), ...)
where 21: vweave_rmarkdown(...)
where 22: engine$weave(file, quiet = quiet, encoding = enc)
where 23: doTryCatch(return(expr), name, parentenv, handler)
where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 25: tryCatchList(expr, classes, parentenv, handlers)
where 26: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 27: tools:::.buildOneVignette("Outcrossing_Populations.Rmd", "/data/gannet/ripley/R/packages/tests-devel/onemap.Rcheck/vign_test/onemap", 
    TRUE, FALSE, "Outcrossing_Populations", "UTF-8", "/tmp/Rtmp5rOgj3/working_dir/RtmpeaVqdv/file6bb3404211b2.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (input.seq, n.best = 50, tol = 0.001, verbose = FALSE) 
{
    if (!any(class(input.seq) == "sequence")) 
        stop(sQuote(deparse(substitute(input.seq))), " is not an object of class 'sequence'")
    if (length(input.seq$seq.num) > 5) 
        cat("WARNING: this operation may take a VERY long time\n")
    utils::flush.console()
    if (length(input.seq$seq.num) > 10) {
        cat("\nIt is not wise trying to use 'compare' with more than 10 markers \n")
        ANSWER <- readline("Are you sure you want to proceed? [y or n]\n")
        while (substr(ANSWER, 1, 1) != "n" & substr(ANSWER, 1, 
            1) != "y") ANSWER <- readline("\nPlease answer: 'y' or 'n' \n")
        if (substr(ANSWER, 1, 1) == "n") 
            stop("Execution stopped!")
    }
    if (length(input.seq$seq.num) == 2) 
        return(map(input.seq, tol = tol))
    else {
        rf.init <- vector("list", length(input.seq$seq.num) - 
            1)
        phase.init <- vector("list", length(input.seq$seq.num) - 
            1)
        best.ord <- matrix(NA, (n.best + 1), length(input.seq$seq.num))
        best.ord.rf <- matrix(NA, (n.best + 1), length(input.seq$seq.num) - 
            1)
        best.ord.phase <- matrix(NA, (n.best + 1), length(input.seq$seq.num) - 
            1)
        best.ord.like <- best.ord.LOD <- rep(-Inf, (n.best + 
            1))
        list.init <- phases(input.seq)
        all.ord <- perm_pars(input.seq$seq.num)
        cat("\nComparing", nrow(all.ord), "orders:     \n\n")
        if (verbose) {
            for (i in 1:nrow(all.ord)) {
                cat("Order", i, ":", all.ord[i, ], "\n")
                utils::flush.console()
                all.match <- match(all.ord[i, ], input.seq$seq.num)
                for (j in 1:(length(input.seq$seq.num) - 1)) {
                  if (all.match[j] > all.match[j + 1]) {
                    rf.init[[j]] <- list.init$rf.init[[acum(all.match[j] - 
                      2) + all.match[j + 1]]]
                    phase.init[[j]] <- list.init$phase.init[[acum(all.match[j] - 
                      2) + all.match[j + 1]]]
                  }
                  else {
                    rf.init[[j]] <- list.init$rf.init[[acum(all.match[j + 
                      1] - 2) + all.match[j]]]
                    phase.init[[j]] <- list.init$phase.init[[acum(all.match[j + 
                      1] - 2) + all.match[j]]]
                  }
                }
                Ph.Init <- comb_ger(phase.init)
                Rf.Init <- comb_ger(rf.init)
                if (nrow(Ph.Init) > 1) {
                  rm.ab <- rem_amb_ph(M = Ph.Init, w = input.seq, 
                    seq.num = all.ord[i, ])
                  Ph.Init <- Ph.Init[rm.ab, ]
                  Rf.Init <- Rf.Init[rm.ab, ]
                  if (class(Ph.Init) == "integer") {
                    Ph.Init <- matrix(Ph.Init, nrow = 1)
                    Rf.Init <- matrix(Rf.Init, nrow = 1)
                  }
                }
                for (j in 1:nrow(Ph.Init)) {
                  final.map <- est_map_hmm_out(geno = t(get(input.seq$data.name, 
                    pos = 1)$geno[, all.ord[i, ]]), type = get(input.seq$data.name, 
                    pos = 1)$segr.type.num[all.ord[i, ]], phase = Ph.Init[j, 
                    ], rf.vec = Rf.Init[j, ], verbose = FALSE, 
                    tol = tol)
                  best.ord[(n.best + 1), ] <- all.ord[i, ]
                  best.ord.rf[(n.best + 1), ] <- final.map$rf
                  best.ord.phase[(n.best + 1), ] <- Ph.Init[j, 
                    ]
                  best.ord.like[(n.best + 1)] <- final.map$loglike
                  like.order <- order(best.ord.like, decreasing = TRUE)
                  best.ord <- best.ord[like.order, ]
                  best.ord.rf <- best.ord.rf[like.order, ]
                  best.ord.phase <- best.ord.phase[like.order, 
                    ]
                  best.ord.like <- sort(best.ord.like, decreasing = TRUE)
                }
            }
        }
        else {
            count <- 0
            pb <- txtProgressBar(style = 3)
            setTxtProgressBar(pb, 0)
            cat("    ")
            for (i in 1:nrow(all.ord)) {
                all.match <- match(all.ord[i, ], input.seq$seq.num)
                for (j in 1:(length(input.seq$seq.num) - 1)) {
                  if (all.match[j] > all.match[j + 1]) {
                    rf.init[[j]] <- list.init$rf.init[[acum(all.match[j] - 
                      2) + all.match[j + 1]]]
                    phase.init[[j]] <- list.init$phase.init[[acum(all.match[j] - 
                      2) + all.match[j + 1]]]
                  }
                  else {
                    rf.init[[j]] <- list.init$rf.init[[acum(all.match[j + 
                      1] - 2) + all.match[j]]]
                    phase.init[[j]] <- list.init$phase.init[[acum(all.match[j + 
                      1] - 2) + all.match[j]]]
                  }
                }
                Ph.Init <- comb_ger(phase.init)
                Rf.Init <- comb_ger(rf.init)
                if (nrow(Ph.Init) > 1) {
                  rm.ab <- rem_amb_ph(M = Ph.Init, w = input.seq, 
                    seq.num = all.ord[i, ])
                  Ph.Init <- Ph.Init[rm.ab, ]
                  Rf.Init <- Rf.Init[rm.ab, ]
                  if (class(Ph.Init) == "integer") {
                    Ph.Init <- matrix(Ph.Init, nrow = 1)
                    Rf.Init <- matrix(Rf.Init, nrow = 1)
                  }
                }
                for (j in 1:nrow(Ph.Init)) {
                  final.map <- est_map_hmm_out(geno = t(get(input.seq$data.name, 
                    pos = 1)$geno[, all.ord[i, ]]), type = get(input.seq$data.name, 
                    pos = 1)$segr.type.num[all.ord[i, ]], phase = Ph.Init[j, 
                    ], rf.vec = Rf.Init[j, ], verbose = FALSE, 
                    tol = tol)
                  best.ord[(n.best + 1), ] <- all.ord[i, ]
                  best.ord.rf[(n.best + 1), ] <- final.map$rf
                  best.ord.phase[(n.best + 1), ] <- Ph.Init[j, 
                    ]
                  best.ord.like[(n.best + 1)] <- final.map$loglike
                  like.order <- order(best.ord.like, decreasing = TRUE)
                  best.ord <- best.ord[like.order, ]
                  best.ord.rf <- best.ord.rf[like.order, ]
                  best.ord.phase <- best.ord.phase[like.order, 
                    ]
                  best.ord.like <- sort(best.ord.like, decreasing = TRUE)
                }
                count <- count + 1
                setTxtProgressBar(pb, count/nrow(all.ord))
            }
            close(pb)
        }
        cat("\n")
        best.ord.LOD <- round((best.ord.like - max(best.ord.like))/log(10), 
            4)
        structure(list(best.ord = best.ord, best.ord.rf = best.ord.rf, 
            best.ord.phase = best.ord.phase, best.ord.like = best.ord.like, 
            best.ord.LOD = best.ord.LOD, data.name = input.seq$data.name, 
            twopt = input.seq$twopt), class = "compare")
    }
}
<bytecode: 0x15ad16a0>
<environment: namespace:onemap>
 --- function search by body ---
Function compare_outcross in namespace onemap has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 569-570 (Outcrossing_Populations.Rmd) 
Error: processing vignette 'Outcrossing_Populations.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building ‘Outcrossing_Populations.Rmd’

--- re-building ‘Overview.Rmd’ using rmarkdown
--- finished re-building ‘Overview.Rmd’

SUMMARY: processing the following file failed:
  ‘Outcrossing_Populations.Rmd’

Error: Vignette re-building failed.
Execution halted