Skip to content

Commit 170e556

Browse files
committed
rename crown_overlay_pct() to overlay_crowns()
1 parent c6901b1 commit 170e556

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
export(.get_tree_list_xy)
44
export(create_fia_owin)
55
export(create_fia_ppp)
6-
export(crown_overlay_pct)
6+
export(overlay_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-
#' `crown_overlay_pct()` computes the proportion of a circular polygon covered
3+
#' `overlay_crowns()` 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,9 +27,9 @@
2727
#' # subplot 1 of the `plantation` plot
2828
#' subp1_trees <- plantation[plantation$SUBP == 1 &
2929
#' plantation$DIA >= 5, ]
30-
#' crown_overlay_pct(subp1_trees, 24)
30+
#' overlay_crowns(subp1_trees, 24)
3131
#' @export
32-
crown_overlay_pct <- function(tree_list, sample_radius, digits = 1) {
32+
overlay_crowns <- function(tree_list, sample_radius, digits = 1) {
3333
if (missing(tree_list) || is.null(tree_list))
3434
stop("'tree_list' is required", call. = FALSE)
3535

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ reference:
2020

2121
- title: Functions
2222
- contents:
23-
- crown_overlay_pct
23+
- overlay_crowns
2424
- spatstat_helpers
Lines changed: 5 additions & 5 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("crown_overlay_pct works", {
1+
test_that("overlay_crowns 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(round(crown_overlay_pct(trees, 24)), 20)
7+
expect_equal(round(overlay_crowns(trees, 24)), 20)
88
})

0 commit comments

Comments
 (0)