Error(s) in re-building vignettes:
  ...
--- re-building ‘getting_started.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
GERGM
 --- call from context --- 
plot_network(lending_2005)
 --- call from argument --- 
if (class(sociomatrix) != "matrix" & class(sociomatrix) != "data.frame") {
    stop("You must provide the network as a numeric matrix.")
}
 --- R stacktrace ---
where 1: plot_network(lending_2005)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: 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 9: evaluate::evaluate(...)
where 10: 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 11: 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 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: 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 17: process_file(text, output)
where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    output_dir = getwd(), ...)
where 20: vweave_rmarkdown(...)
where 21: engine$weave(file, quiet = quiet, encoding = enc)
where 22: doTryCatch(return(expr), name, parentenv, handler)
where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 24: tryCatchList(expr, classes, parentenv, handlers)
where 25: 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 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/GERGM.Rcheck/vign_test/GERGM", 
    ser_elibs = "/home/hornik/tmp/scratch/RtmpKGs3cP/file2a8b17c7cf5b.rds")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (sociomatrix, threshold = 0.5, save_pdf = FALSE, pdf_name = "Test.pdf", 
    output_directory = "./", comparison_network = NULL, comparison_names = NULL, 
    seed = NULL, white_background = FALSE, show_legend = TRUE, 
    title = "", identical_node_positions = FALSE) 
{
    if (!is.null(seed)) {
        set.seed(seed)
    }
    par(mar = c(1, 0, 1, 0))
    if (class(sociomatrix) != "matrix" & class(sociomatrix) != 
        "data.frame") {
        stop("You must provide the network as a numeric matrix.")
    }
    if (nrow(sociomatrix) != ncol(sociomatrix)) {
        stop("You must provide a square matrix.")
    }
    if (white_background) {
        negcolors <- colorRampPalette(c("red", "white"))
        poscolors <- colorRampPalette(c("white", "blue"))
        negcolors <- negcolors(25)
        poscolors <- poscolors(25)
    }
    else {
        negcolors <- colorRampPalette(c("red", "black"))
        poscolors <- colorRampPalette(c("black", "blue"))
        negcolors <- negcolors(25)
        poscolors <- poscolors(25)
    }
    COMPARISON <- FALSE
    if (!is.null(comparison_network)) {
        if (is.null(comparison_names)) {
            comparison_names <- c("", "")
        }
        else {
            if (length(comparison_names) != 2) {
                stop("You must provide a comparison_names object as a vector containing two strings.")
            }
        }
        if (class(comparison_network) != "matrix" & class(comparison_network) != 
            "data.frame") {
            stop("You must provide the network as a numeric matrix.")
        }
        if (nrow(comparison_network) != ncol(comparison_network)) {
            stop("You must provide a square matrix.")
        }
        if (nrow(comparison_network) != nrow(sociomatrix)) {
            stop("You must provide two matrices with the same dimensions.")
        }
        COMPARISON <- TRUE
        diag(comparison_network) <- 0
        temp <- temp2 <- matrix(comparison_network[, ], nrow(comparison_network), 
            ncol(comparison_network))
        cutoff <- max(abs(temp)) * threshold
        temp[which(abs(temp) < cutoff)] <- 0
        net3 <- igraph::graph.adjacency(temp, mode = "directed", 
            weighted = TRUE, diag = FALSE)
        layout_c <- igraph::layout_with_fr(net3, weights = igraph::E(net3)$weight)
        net4 <- igraph::graph.adjacency(temp2, mode = "directed", 
            weighted = TRUE, diag = FALSE)
        edgelist_c <- igraph::get.edgelist(net4)
        weights_c <- igraph::E(net4)$weight
        ordering <- order(abs(weights_c), decreasing = F)
        edgelist_c <- edgelist_c[ordering, ]
        weights_c <- weights_c[ordering]
    }
    diag(sociomatrix) <- 0
    temp <- temp2 <- matrix(sociomatrix[, ], nrow(sociomatrix), 
        ncol(sociomatrix))
    cutoff <- max(abs(temp)) * threshold
    temp[which(abs(temp) < cutoff)] <- 0
    net <- igraph::graph.adjacency(temp, mode = "directed", weighted = TRUE, 
        diag = FALSE)
    layout <- igraph::layout_with_fr(net, weights = igraph::E(net)$weight)
    net2 <- igraph::graph.adjacency(temp2, mode = "directed", 
        weighted = TRUE, diag = FALSE)
    edgelist <- igraph::get.edgelist(net2)
    weights <- igraph::E(net2)$weight
    ordering <- order(abs(weights), decreasing = F)
    edgelist <- edgelist[ordering, ]
    weights <- weights[ordering]
    negbreaks <- seq(-max(abs(weights)), 0, length.out = 26)
    posbreaks <- seq(0, max(abs(weights)), length.out = 26)
    widbreaks <- seq(0, max(abs(weights)), length.out = 50)
    widths <- seq(0, 5, length.out = 50)
    if (COMPARISON) {
        negbreaks <- seq(-max(abs(c(weights, weights_c))), 0, 
            length.out = 26)
        posbreaks <- seq(0, max(abs(c(weights, weights_c))), 
            length.out = 26)
        widbreaks <- seq(0, max(abs(c(weights, weights_c))), 
            length.out = 50)
        widths <- seq(0, 5, length.out = 50)
    }
    if (COMPARISON) {
        if (identical_node_positions) {
            layout_c <- layout
        }
        else {
            layout_c <- vegan::procrustes(layout, layout_c, scale = F)$Yrot
        }
    }
    if (save_pdf) {
        cur_directory <- getwd()
        setwd(output_directory)
        if (COMPARISON) {
            pdf(file = pdf_name, width = 24, height = 12)
            if (white_background) {
                par(bg = "white", oma = c(1, 1, 2, 1) + 0.1, 
                  mar = c(0, 0.5, 1, 0.5) + 0.5, xpd = TRUE, 
                  mfrow = c(1, 2))
                plot(layout, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[1], 
                  col.main = "black", xlim = c((min(layout[, 
                    1]) - 0.1), (max(layout[, 1]) + 0.1)), ylim = c((min(layout[, 
                    2]) - 1.3), (max(layout[, 2]) + 0.5)))
            }
            else {
                par(bg = "black", oma = c(1, 1, 2, 1) + 0.1, 
                  mar = c(0, 0.5, 1, 0.5) + 0.5, xpd = TRUE, 
                  mfrow = c(1, 2))
                plot(layout, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[1], 
                  col.main = "white", xlim = c((min(layout[, 
                    1]) - 0.1), (max(layout[, 1]) + 0.1)), ylim = c((min(layout[, 
                    2]) - 1.3), (max(layout[, 2]) + 0.5)))
            }
            max_bin <- 1
            min_bin <- 1
            for (i in 1:length(weights)) {
                cur1 <- layout[edgelist[i, 1], ]
                cur2 <- layout[edgelist[i, 2], ]
                curweight <- weights[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                  if (bin > max_bin) {
                    max_bin <- bin
                  }
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                  if (bin > min_bin) {
                    min_bin <- bin
                  }
                }
            }
            if (white_background) {
                text(layout, labels = rownames(sociomatrix), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c(negcolors[min_bin - 
                      1], poscolors[max_bin - 1]), horiz = T, 
                    bg = "white", text.col = "black", box.col = "white")
                }
            }
            else {
                text(layout, labels = rownames(sociomatrix), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c(negcolors[min_bin - 
                      1], poscolors[max_bin - 1]), horiz = T, 
                    bg = "black", text.col = "white")
                }
            }
            if (white_background) {
                plot(layout_c, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[2], 
                  col.main = "black", xlim = c((min(layout_c[, 
                    1]) - 0.1), (max(layout_c[, 1]) + 0.1)), 
                  ylim = c((min(layout_c[, 2]) - 1.3), (max(layout_c[, 
                    2]) + 0.5)))
            }
            else {
                plot(layout_c, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[2], 
                  col.main = "white", xlim = c((min(layout_c[, 
                    1]) - 0.1), (max(layout_c[, 1]) + 0.1)), 
                  ylim = c((min(layout_c[, 2]) - 1.3), (max(layout_c[, 
                    2]) + 0.5)))
            }
            max_bin_c <- 1
            min_bin_c <- 1
            for (i in 1:length(weights_c)) {
                cur1 <- layout_c[edgelist_c[i, 1], ]
                cur2 <- layout_c[edgelist_c[i, 2], ]
                curweight <- weights_c[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                  if (bin > max_bin_c) {
                    max_bin_c <- bin
                  }
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                  if (bin > min_bin_c) {
                    min_bin_c <- bin
                  }
                }
            }
            if (white_background) {
                text(layout_c, labels = rownames(comparison_network), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(comparison_network), 
                      2), round(max(comparison_network), 2)), 
                    fill = c(negcolors[min_bin_c - 1], poscolors[max_bin_c - 
                      1]), horiz = T, bg = "white", text.col = "black", 
                    box.col = "white")
                }
            }
            else {
                text(layout_c, labels = rownames(comparison_network), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(comparison_network), 
                      2), round(max(comparison_network), 2)), 
                    fill = c(negcolors[min_bin_c - 1], poscolors[max_bin_c - 
                      1]), horiz = T, bg = "black", text.col = "white")
                }
            }
            dev.off()
        }
        else {
            pdf(file = pdf_name, width = 12, height = 12)
            if (white_background) {
                par(bg = "white", oma = c(0.1, 0.1, 0.1, 0.1) + 
                  0.1, mar = c(0, 0, 0, 0), xpd = TRUE, mfrow = c(1, 
                  1))
                plot(layout, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = title, 
                  xlim = c((min(layout[, 1]) - 2), (max(layout[, 
                    1]) + 2)), ylim = c((min(layout[, 2]) - 2), 
                    (max(layout[, 2]) + 2)))
            }
            else {
                par(bg = "black", oma = c(0.1, 0.1, 0.1, 0.1) + 
                  0.1, mar = c(0, 0, 0, 0), xpd = TRUE, mfrow = c(1, 
                  1))
                plot(layout, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = title, 
                  xlim = c((min(layout[, 1]) - 2), (max(layout[, 
                    1]) + 2)), ylim = c((min(layout[, 2]) - 2), 
                    (max(layout[, 2]) + 2)))
            }
            for (i in 1:length(weights)) {
                cur1 <- layout[edgelist[i, 1], ]
                cur2 <- layout[edgelist[i, 2], ]
                curweight <- weights[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                }
            }
            if (white_background) {
                text(layout, labels = rownames(sociomatrix), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c("red", 
                      "blue"), horiz = T, bg = "white", text.col = "black", 
                    box.col = "white")
                }
            }
            else {
                text(layout, labels = rownames(sociomatrix), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c("red", 
                      "blue"), horiz = T, bg = "black", text.col = "white")
                }
            }
            dev.off()
        }
        setwd(cur_directory)
    }
    else {
        if (COMPARISON) {
            if (white_background) {
                par(bg = "white", oma = c(1, 1, 2, 1) + 0.1, 
                  mar = c(0, 0.5, 1, 0.5) + 0.5, xpd = TRUE, 
                  mfrow = c(1, 2))
                plot(layout, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[1], 
                  col.main = "black", xlim = c((min(layout[, 
                    1]) - 0.1), (max(layout[, 1]) + 0.1)), ylim = c((min(layout[, 
                    2]) - 1.3), (max(layout[, 2]) + 0.5)))
            }
            else {
                par(bg = "black", oma = c(1, 1, 2, 1) + 0.1, 
                  mar = c(0, 0.5, 1, 0.5) + 0.5, xpd = TRUE, 
                  mfrow = c(1, 2))
                plot(layout, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[1], 
                  col.main = "white", xlim = c((min(layout[, 
                    1]) - 0.1), (max(layout[, 1]) + 0.1)), ylim = c((min(layout[, 
                    2]) - 1.3), (max(layout[, 2]) + 0.5)))
            }
            max_bin <- 1
            min_bin <- 1
            for (i in 1:length(weights)) {
                cur1 <- layout[edgelist[i, 1], ]
                cur2 <- layout[edgelist[i, 2], ]
                curweight <- weights[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                  if (bin > max_bin) {
                    max_bin <- bin
                  }
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                  if (bin > min_bin) {
                    min_bin <- bin
                  }
                }
            }
            print(max_bin)
            if (white_background) {
                text(layout, labels = rownames(sociomatrix), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c(negcolors[min_bin - 
                      1], poscolors[max_bin - 1]), horiz = T, 
                    bg = "white", text.col = "black", box.col = "white")
                }
            }
            else {
                text(layout, labels = rownames(sociomatrix), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c(negcolors[min_bin - 
                      1], poscolors[max_bin - 1]), horiz = T, 
                    bg = "black", text.col = "white")
                }
            }
            if (white_background) {
                plot(layout_c, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[2], 
                  col.main = "black", xlim = c((min(layout_c[, 
                    1]) - 0.1), (max(layout_c[, 1]) + 0.1)), 
                  ylim = c((min(layout_c[, 2]) - 1.3), (max(layout_c[, 
                    2]) + 0.5)))
            }
            else {
                plot(layout_c, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = comparison_names[2], 
                  col.main = "white", xlim = c((min(layout_c[, 
                    1]) - 0.1), (max(layout_c[, 1]) + 0.1)), 
                  ylim = c((min(layout_c[, 2]) - 1.3), (max(layout_c[, 
                    2]) + 0.5)))
            }
            max_bin_c <- 1
            min_bin_c <- 1
            for (i in 1:length(weights_c)) {
                cur1 <- layout_c[edgelist_c[i, 1], ]
                cur2 <- layout_c[edgelist_c[i, 2], ]
                curweight <- weights_c[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                  if (bin > max_bin_c) {
                    max_bin_c <- bin
                  }
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                  if (bin > min_bin_c) {
                    min_bin_c <- bin
                  }
                }
            }
            if (white_background) {
                text(layout_c, labels = rownames(comparison_network), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(comparison_network), 
                      2), round(max(comparison_network), 2)), 
                    fill = c(negcolors[min_bin_c - 1], poscolors[max_bin_c - 
                      1]), horiz = T, bg = "white", text.col = "black", 
                    box.col = "white")
                }
            }
            else {
                text(layout_c, labels = rownames(comparison_network), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(comparison_network), 
                      2), round(max(comparison_network), 2)), 
                    fill = c(negcolors[min_bin_c - 1], poscolors[max_bin_c - 
                      1]), horiz = T, bg = "black", text.col = "white")
                }
            }
        }
        else {
            if (white_background) {
                par(bg = "white", oma = c(0.1, 0.1, 0.1, 0.1) + 
                  0.1, mar = c(0, 0, 0, 0), xpd = TRUE, mfrow = c(1, 
                  1))
                plot(layout, pch = 20, cex = 1, col = "white", 
                  axes = F, xlab = "", ylab = "", main = title, 
                  xlim = c((min(layout[, 1]) - 0.2), (max(layout[, 
                    1]) + 0.2)), ylim = c((min(layout[, 2]) - 
                    0.2), (max(layout[, 2]) + 0.2)))
            }
            else {
                par(bg = "black", oma = c(0.1, 0.1, 0.1, 0.1) + 
                  0.1, mar = c(0, 0, 0, 0), xpd = TRUE, mfrow = c(1, 
                  1))
                plot(layout, pch = 20, cex = 1, col = "black", 
                  axes = F, xlab = "", ylab = "", main = title, 
                  xlim = c((min(layout[, 1]) - 0.2), (max(layout[, 
                    1]) + 0.2)), ylim = c((min(layout[, 2]) - 
                    0.2), (max(layout[, 2]) + 0.2)))
            }
            for (i in 1:length(weights)) {
                cur1 <- layout[edgelist[i, 1], ]
                cur2 <- layout[edgelist[i, 2], ]
                curweight <- weights[i]
                nf <- TRUE
                counter <- 1
                bin <- 1
                while (nf) {
                  if (curweight > 0) {
                    if (posbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  else {
                    if (negbreaks[counter] >= curweight) {
                      bin <- counter
                      nf <- FALSE
                    }
                  }
                  counter <- counter + 1
                }
                nf <- TRUE
                counter <- 1
                wid <- 1
                while (nf) {
                  if (widbreaks[counter] >= abs(curweight)) {
                    wid <- counter
                    nf <- FALSE
                  }
                  counter <- counter + 1
                }
                if (curweight > 0) {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = poscolors[bin], lwd = widths[wid])
                }
                else {
                  lines(c(cur1[1], cur2[1]), c(cur1[2], cur2[2]), 
                    col = negcolors[bin], lwd = widths[wid])
                }
            }
            if (white_background) {
                text(layout, labels = rownames(sociomatrix), 
                  col = "black")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "black", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c("red", 
                      "blue"), horiz = T, bg = "white", text.col = "black", 
                    box.col = "white")
                }
            }
            else {
                text(layout, labels = rownames(sociomatrix), 
                  col = "white")
                if (show_legend) {
                  legend("bottom", inset = 0, title = "Edge Values", 
                    title.col = "white", legend = c(round(min(sociomatrix), 
                      2), round(max(sociomatrix), 2)), fill = c("red", 
                      "blue"), horiz = T, bg = "black", text.col = "white")
                }
            }
        }
    }
    par(bg = "white")
}
<bytecode: 0x557585548b68>
<environment: namespace:GERGM>
 --- function search by body ---
Function plot_network in namespace GERGM has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 96-102 (getting_started.Rmd) 
Error: processing vignette 'getting_started.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building ‘getting_started.Rmd’

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

Error: Vignette re-building failed.
Execution halted