Error(s) in re-building vignettes:
  ...
--- re-building 'Vignette.Rmd' using rmarkdown
Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: tidyr
Loading required package: ggplot2
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ushr
 --- call from context --- 
fit_model(data = data_filtered, id_vector = id_filtered, param_names = param_names, 
    initial_params = initial_params, free_param_index = free_param_index, 
    n_min_biphasic = n_min_biphasic, model_list = "four", whichcurve = get_biphasic, 
    forward_param_transform_fn = forward_param_transform_fn, 
    inv_param_transform_fn = inv_param_transform_fn, searchmethod = searchmethod)
 --- call from argument --- 
if (class(trySolve) == "try-error") {
    tmpCI <- NA
} else {
    tmpCI <- get_CI(fit)
}
 --- R stacktrace ---
where 1: fit_model(data = data_filtered, id_vector = id_filtered, param_names = param_names, 
    initial_params = initial_params, free_param_index = free_param_index, 
    n_min_biphasic = n_min_biphasic, model_list = "four", whichcurve = get_biphasic, 
    forward_param_transform_fn = forward_param_transform_fn, 
    inv_param_transform_fn = inv_param_transform_fn, searchmethod = searchmethod)
where 2: ushr(data = actg315, detection_threshold = 100)
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, 
    encoding = encoding)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
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)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 27: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/ushr.Rcheck/vign_test/ushr", 
    ser_elibs = "/tmp/RtmpulnSP7/file706d6f3a14d7.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (data, id_vector, param_names, initial_params, free_param_index, 
    n_min_biphasic, model_list, whichcurve = get_biphasic, forward_param_transform_fn, 
    inv_param_transform_fn, searchmethod) 
{
    fitlist <- vector("list", length = length(id_vector))
    CIlist <- vector("list", length = length(id_vector))
    model_fitlist <- vector("list", length = length(id_vector))
    nofitlist <- vector("list", length = length(id_vector))
    noCIlist <- vector("list", length = length(id_vector))
    for (i in 1:length(id_vector)) {
        datasubset = data %>% filter(id == id_vector[i])
        if ((nrow(datasubset) < n_min_biphasic) && (model_list == 
            "four")) {
            nofitlist[[i]] <- data.frame(index = i, id = id_vector[i], 
                reason = "not enough data")
            next
        }
        fitlist[[i]] <- data.frame(index = i, id = id_vector[i])
        fit <- get_optim_fit(initial_params, param_names, free_param_index, 
            data = datasubset, forward_param_transform_fn = forward_param_transform_fn, 
            inv_param_transform_fn = inv_param_transform_fn, 
            model_list = model_list, searchmethod = searchmethod)
        best_param <- get_params(fit, initial_params, free_param_index, 
            param_names, inv_param_transform_fn, index = i)
        if (det(fit$hessian) != 0 & all(!is.na(fit$hessian))) {
            trySolve <- try(solve(fit$hessian))
            if (class(trySolve) == "try-error") {
                tmpCI <- NA
            }
            else {
                tmpCI <- get_CI(fit)
            }
            if (any(is.na(tmpCI))) {
                noCIlist[[i]] <- data.frame(index = i, id = id_vector[i], 
                  reason = "could not obtain CIs")
            }
            else {
                CIlist[[i]] <- tmpCI %>% mutate(id = id_vector[i])
                model_fitlist[[i]] <- get_curve(data = datasubset, 
                  best_param, param_names = param_names[free_param_index], 
                  whichcurve = whichcurve)
            }
        }
        else {
            noCIlist[[i]] <- data.frame(index = i, id = id_vector[i], 
                reason = "could not obtain CIs")
        }
    }
    notfitted <- bind_rows(nofitlist) %>% rbind(bind_rows(noCIlist)) %>% 
        filter(!is.na(index)) %>% arrange(index)
    if (length(notfitted$id) > 0) {
        fitted <- bind_rows(fitlist) %>% filter(!id %in% notfitted$id)
    }
    else {
        fitted <- bind_rows(fitlist)
    }
    return(list(model_fitlist = model_fitlist, CIlist = CIlist, 
        fitted = fitted, notfitted = notfitted))
}
<bytecode: 0x7afd9c0>
<environment: namespace:ushr>
 --- function search by body ---
Function fit_model in namespace ushr has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1