Skip to content

Commit 35ad582

Browse files
committed
remove unused SPGRPCD, remove CRWIDTH from plantation and compute as needed
1 parent 5af2d9f commit 35ad582

7 files changed

Lines changed: 10 additions & 18 deletions

File tree

R/data.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ DEFAULT_TREE_COLUMNS <- c("PLT_CN", "SUBP", "TREE", "AZIMUTH", "DIST",
132132
#' An example tree list for an FIA plot in a loblolly pine plantation.
133133
#'
134134
#' @format ## `plantation`
135-
#' A data frame with 91 rows and 14 columns:
135+
#' A data frame with 91 rows and 12 columns:
136136
#' \describe{
137137
#' \item{\code{PLT_CN}}{\code{\link{character}}, Plot unique identifier}
138138
#' \item{\code{SUBP}}{\code{\link{integer}}, Subplot number}
@@ -144,7 +144,6 @@ DEFAULT_TREE_COLUMNS <- c("PLT_CN", "SUBP", "TREE", "AZIMUTH", "DIST",
144144
#' \item{\code{STATUSCD}}{\code{\link{integer}},
145145
#' Tree status code: 1 = live, 2 = standing dead}
146146
#' \item{\code{SPCD}}{\code{\link{integer}}, FIA tree species code}
147-
#' \item{\code{SPGRPCD}}{\code{\link{integer}}, FIA tree species group code}
148147
#' \item{\code{DIA}}{\code{\link{numeric}},
149148
#' Tree diameter at breast height in inches}
150149
#' \item{\code{HT}}{\code{\link{integer}}, Tree height in feet}
@@ -153,8 +152,6 @@ DEFAULT_TREE_COLUMNS <- c("PLT_CN", "SUBP", "TREE", "AZIMUTH", "DIST",
153152
#' \item{\code{CCLCD}}{\code{\link{integer}}, Tree crown class code}
154153
#' \item{\code{TPA_UNADJ}}{\code{\link{numeric}},
155154
#' Trees per acre expansion factor}
156-
#' \item{\code{CRWIDTH}}{\code{\link{numeric}},
157-
#' Estimated tree crown width in feet}
158155
#' }
159156
#' @source <https://research.fs.usda.gov/programs/nfi>
160157
"plantation"

R/overlay_crowns.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#'
2626
#' @examples
2727
#' # subplot 1 of the `plantation` plot
28-
#' subp1_trees <- plantation[plantation$SUBP == 1 &
29-
#' plantation$DIA >= 5, ]
30-
#' overlay_crowns(subp1_trees, 24)
28+
#' trees <- within(plantation, CRWIDTH <- predict_crwidth(plantation))
29+
#' trees[trees$SUBP == 1 & trees$DIA >= 5, ] |>
30+
#' overlay_crowns(sample_radius = 24)
3131
#' @export
3232
overlay_crowns <- function(tree_list, sample_radius, digits = 1) {
3333
if (missing(tree_list) || is.null(tree_list))

R/spatstat_helpers.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
#' * `DIST`: required distance from subplot center
2727
#' * `STATUSCD`: required tree status code (1 = live, 2 = dead)
2828
#' * `SPCD`: optional FIA species code
29-
#' * `SPGRPCD`: optional FIA species group code
3029
#' * `DIA`: optional tree diameter
3130
#' * `HT`: optional tree height
3231
#' * `ACTUALHT`: optional tree actual height (accounts for broken top)
3332
#' * `CCLCD`: optional crown class code
3433
#' * `TPA_UNADJ`: optional tree expansion factor (per acre)
35-
#' * `CRWIDTH`: optional crown width (may be computed with **TODO**)
34+
#' * `CRWIDTH`: optional crown width (see `predict_crwidth()`)
3635
#'
3736
#' @param linear_unit An optional character string specifying the linear
3837
#' distance unit. Defaults to the native FIA unit of `"ft"`, but may be set to

data/plantation.rda

-444 Bytes
Binary file not shown.

man/overlay_crowns.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plantation.Rd

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/spatstat_helpers.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)