From dcdeab5d130bf93da2bf118c153fe6e9d46c9bdd Mon Sep 17 00:00:00 2001 From: Ronald Bergmann Date: Sun, 25 Jun 2023 16:57:36 +0200 Subject: [PATCH] fix missing igraph qualifier --- R/select_traits_tax_dist.R | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/R/select_traits_tax_dist.R b/R/select_traits_tax_dist.R index 9579bb7..e4999b5 100644 --- a/R/select_traits_tax_dist.R +++ b/R/select_traits_tax_dist.R @@ -227,9 +227,7 @@ select_traits_tax_dist <- function(data, msg = paste(trait, "list conversion did not work") ) - output <- - - lapply(data_list, function(input) { + output <- lapply(data_list, function(input) { # get the relevant taxonomic backbones htm_db <- get(paste0(input[["db"]], "_db")) @@ -240,12 +238,9 @@ select_traits_tax_dist <- function(data, target_name_cond <- extract_genus(target_name) # test if the target name is present in any of the taxon matrices - target_present <- - sapply(htm_db, function(htm) { - - target_name_cond %in% names(V(htm)) - - }) + target_present <- sapply(htm_db, function(htm) { + target_name_cond %in% names(igraph::V(htm)) + }) # if the target taxon is not present in any backbone then return an explanation if(is.na(target_name_cond)) {