From d4f2955aa5e5553707fadb38c8d75abc63cc79d9 Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Mon, 8 Jan 2024 16:18:31 -0800 Subject: [PATCH] get_SDA_coecoclass: fix bug with components with more than one ecosite --- R/get_SDA_coecoclass.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/get_SDA_coecoclass.R b/R/get_SDA_coecoclass.R index 21988049..5b20a467 100644 --- a/R/get_SDA_coecoclass.R +++ b/R/get_SDA_coecoclass.R @@ -220,7 +220,7 @@ get_SDA_coecoclass <- function(method = "None", data.frame( ecoclassid = not_rated_value, ecoclassname = not_rated_value, - condpct_r = 100 - sum(condpct_r[nchar(compnames) > 0], na.rm = TRUE), + condpct_r = sum(condpct_r[nchar(unassigned) > 0 & !unassigned %in% compnames], na.rm = TRUE), compnames = paste0(unassigned[nchar(unassigned) > 0 & !unassigned %in% compnames], collapse = ",") )