Skip to content

Commit 81f5fa8

Browse files
committed
rename overlay_crowns() to calc_crown_overlay()
1 parent a2565d1 commit 81f5fa8

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
export(.get_fia_plot_geom)
44
export(.get_tree_list_xy)
55
export(DEFAULT_TREE_COLUMNS)
6+
export(calc_crown_overlay)
67
export(calc_crwidth)
78
export(calc_ht_metrics)
89
export(create_fia_owin)
910
export(create_fia_ppp)
1011
export(load_tree_data)
11-
export(overlay_crowns)
1212
export(plot_crowns)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Compute fractional tree canopy cover of a subplot/microplot by crown overlay
22
#'
3-
#' `overlay_crowns()` computes the proportion of a circular polygon covered
3+
#' `calc_crown_overlay()` computes the proportion of a circular polygon covered
44
#' by a given set of tree crowns modeled as discs and having spatially explicit
55
#' stem locations. The sampled area is generally an FIA subplot with radius 24
66
#' ft (7.315 m) for trees with diameter \verb{>= 5 in.} (12.7 cm), or an FIA
@@ -27,11 +27,11 @@
2727
#' # subplot 1 of the `plantation` plot
2828
#' trees <- within(plantation, CRWIDTH <- calc_crwidth(plantation))
2929
#' trees[trees$SUBP == 1 & trees$DIA >= 5, ] |>
30-
#' overlay_crowns(sample_radius = 24)
30+
#' calc_crown_overlay(sample_radius = 24)
3131
#'
3232
#' plot_crowns(trees, subplot = 1, main = "plantation subplot 1")
3333
#' @export
34-
overlay_crowns <- function(tree_list, sample_radius, digits = 1) {
34+
calc_crown_overlay <- function(tree_list, sample_radius, digits = 1) {
3535
if (missing(tree_list) || is.null(tree_list))
3636
stop("'tree_list' is required", call. = FALSE)
3737

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ home:
1414
reference:
1515
- title: Functions
1616
- contents:
17+
- calc_crown_overlay
1718
- calc_crwidth
1819
- calc_ht_metrics
1920
- load_tree_data
20-
- overlay_crowns
2121
- plot_crowns
2222
- spatstat_helpers
2323

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
test_that("overlay_crowns works", {
1+
test_that("calc_crown_overlay works", {
22
# test tree list used in the original subp_crcov.c
33
trees <- c(117,22.1,7.71,72,19.4,10.0,66,17.3,8.94,258,13.2,17.28) |>
44
matrix(nrow = 4, ncol = 3, byrow = TRUE) |>
55
as.data.frame()
66
colnames(trees) <- c("AZIMUTH", "DIST", "CRWIDTH")
7-
expect_equal(overlay_crowns(trees, 24, 0), 20)
7+
expect_equal(calc_crown_overlay(trees, 24, 0), 20)
88
})

0 commit comments

Comments
 (0)