Skip to content

Commit

Permalink
fix missing igraph qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
black-snow committed Jun 25, 2023
1 parent 5278e5d commit dcdeab5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions R/select_traits_tax_dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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)) {
Expand Down

0 comments on commit dcdeab5

Please sign in to comment.