Skip to content

Commit

Permalink
- fixed one note
Browse files Browse the repository at this point in the history
  • Loading branch information
billbillbilly committed Jan 26, 2024
1 parent bf1f2ed commit 0a21490
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/calculate_diversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0a21490

Please sign in to comment.