From 0a21490092c7ed9efaacae50c7e79fcbbe3e9369 Mon Sep 17 00:00:00 2001 From: billbillbilly Date: Fri, 26 Jan 2024 00:31:22 -0500 Subject: [PATCH] - fixed one note --- R/calculate_diversity.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/calculate_diversity.R b/R/calculate_diversity.R index d94479f..7f646fe 100644 --- a/R/calculate_diversity.R +++ b/R/calculate_diversity.R @@ -48,7 +48,10 @@ calculate_diversity <- function(viewshed, p <- land_class$proportion sdi <- sd_index(p) if (proportion) { - return(list(SDI=sdi, Proportion=t(subset(land_class, select = c(type, proportion))))) + return(list(SDI=sdi, + Proportion=t(subset(land_class, + select = c(.data$type, + proportion))))) } else { return(sdi) }