From 2eac9e5218ab16f1ddea3e24e8d8fa5b9bb2c840 Mon Sep 17 00:00:00 2001 From: Ioannis Kosmidis Date: Tue, 22 May 2018 11:49:42 +0100 Subject: [PATCH] Minor hack to prevent errors --- R/build_network.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/build_network.R b/R/build_network.R index 75eb928..74dc000 100644 --- a/R/build_network.R +++ b/R/build_network.R @@ -71,7 +71,8 @@ build_network.cranly_db <- function(object = clean_CRAN_db(), object, by = "package", all.x = TRUE) base_packages <- utils::installed.packages(priority = "high") - base_package_names <- base_packages[, "Package"] + base_package_names <- unique(base_packages[, "Package"]) + inds <- which(base_package_names %in% nodes$package) nodes[nodes$package %in% base_package_names, "priority"] <- base_packages[inds, "Priority"]