Skip to content
Snippets Groups Projects
Commit 7d31852d authored by fvafrcu's avatar fvafrcu
Browse files

Uncommented changes: backing up

parent da1b8b3a
No related branches found
No related tags found
No related merge requests found
Pipeline #1145930299 passed
......@@ -11,7 +11,6 @@ export(get_intersection)
export(get_r_max)
export(orthogonal)
export(plot_tree_plot_area)
export(plot_tree_plot_areas)
export(points2equation)
export(secant_intersections)
export(select_valid_angle_count_trees)
......
# treePlotArea 1.4.1.9000
* Added `plot_tree_plot_areas()` as requested by Gerald Kaendler.
* As requested by Gerald Kaendler, 'plot_tree_plot_area()' now plots all trees
of a corner, if no tree number is given.
* To allow for using the field data, I have added missing dbh to the internal
checks, albeit it being reported by `validate_data()`. Just in case I should
forget to validate data first.
......
#' Plot a Single Tree
#' Plot Tree Plot Area
#'
#' Visualize a tree, it's plot area and its corner's boundaries.
#' Visualize a corner, its boundaries and tree plot areas.
#' @inheritParams get_correction_factors
#' @param tnr Number of the tract.
#' @param enr Number of the tract's corner.
#' @param bnr Number of the corner's tree.
#' @param use_sub Use the subtitle (or leave it blank)? Stick with the default.
#' @param bnr If given, the number of a corner's tree.
#' @param use_sub Deprecated.
#' @param frame_factor Plotting from as a factor of the tree plot area. Stick
#' with the default.
#' @return The corrections factor for the tree's plot area.
#' @return The corrections factors for the trees' plot areas.
#' @export
#' @examples
#' tnr <- 166
......@@ -19,93 +19,19 @@
#' boundaries = get(data("boundaries",
#' package = "treePlotArea")),
#' tnr = tnr, enr = enr, bnr = bnr, frame_factor = 4)
plot_tree_plot_area <- function(angle_counts, boundaries, tnr, enr, bnr,
frame_factor = 4, use_sub = TRUE) {
options <- get_options("all")
o_a <- options[["angle_counts"]]
o_b <- options[["boundaries"]]
col_eff <- "green4"
col_plot1 <- "black"
col_plot2 <- "gray74"
col_tree <- "red"
col_tree_center <- "cyan"
col_border_tetragon <- "blue"
col_border_pentagon <- "yellow"
col_boundaries <- "orange"
tree <- angle_counts[angle_counts[[o_a[["tract_id"]]]] == tnr &
angle_counts[[o_a[["corner_id"]]]] == enr &
angle_counts[[o_a[["tree_id"]]]] == bnr,
TRUE]
bounds <- boundaries[boundaries[[o_b[["tract_id"]]]] == tnr &
boundaries[[o_b[["corner_id"]]]] == enr,
TRUE]
bounds <- get_current_boundaries(bounds)
tree[, c("x", "y")] <- bwi2cartesian(tree[[o_a[["azimuth"]]]],
tree[[o_a[["distance"]]]])
circ <- tree2polygon(tree)
coords <- boundaries2coords(bounds)
coords_split <- split_coords(coords)
b <- boundaries2polygons(bounds)
pc <- get_partial_circle(circ, b)
plot(0, 0, col = col_plot1, pch = "+",
xlim = c(-get_r_max() * frame_factor, get_r_max() * frame_factor),
ylim = c(-get_r_max() * frame_factor, get_r_max() * frame_factor),
xlab = "x [cm]", ylab = "y [cm]")
plot(sf::st_polygon(list(circ)), border = col_tree, col = col_tree,
add = TRUE)
plot(pc, add = TRUE, border = col_eff, col = col_eff)
plot(sf::st_polygon(b), add = TRUE, border = col_boundaries)
graphics::abline(h = 0, col = col_plot1)
graphics::abline(v = 0, col = col_plot1)
plot(sf::st_polygon(list(circle2polygon(r = get_r_max()))), add = TRUE,
border = col_plot1)
plot(sf::st_polygon(list(circle2polygon(r = 2 * get_r_max()))), add = TRUE,
border = col_plot2)
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
add_boundaries_to_plot(coords)
add_boundaries_to_plot(as.data.frame(coords_split),
col = c(col_border_tetragon, col_border_pentagon))
bl <- get_boundary_polygons(bounds)
res <- get_correction_factor(tree, bl)["correction_factor"]
if (isTRUE(use_sub)) {
graphics::title(main = paste("tract:", tnr, "corner:", enr, "tree:",
bnr),
sub = paste("correction factor:", res))
} else {
graphics::title(main = paste("tract:", tnr, "corner:", enr, "tree:",
bnr,
"correction factor:", res))
}
return(res)
}
#' Plot a Set of Trees
#'
#' Visualize a corner, its boundaries and tree plot areas.
#' @inheritParams plot_tree_plot_area
#' @return The corrections factors for the trees' plot areas.
#' @export
#' @examples
#' tnr <- 166
#' enr <- 2
#' angle_counts <- bw2bwi2022de(get(data("trees", package = "treePlotArea")))
#' plot_tree_plot_areas(angle_counts = angle_counts,
#' plot_tree_plot_area(angle_counts = angle_counts,
#' boundaries = get(data("boundaries",
#' package = "treePlotArea")),
#' tnr = tnr, enr = enr)
plot_tree_plot_areas <- function(angle_counts, boundaries, tnr, enr,
frame_factor = 1, use_sub = TRUE) {
#' tnr = tnr, enr = enr, frame_factor = 1)
plot_tree_plot_area <- function(angle_counts, boundaries, tnr, enr, bnr = NULL,
frame_factor = 1, use_sub = NULL) {
if (!is.null(use_sub)) warning("Argument `use_sub` is deprecated.")
options <- get_options("all")
o_a <- options[["angle_counts"]]
o_b <- options[["boundaries"]]
col_eff <- "green4"
col_plot1 <- "black"
col_plot2 <- "gray74"
col_tree <- "red"
col_tree_center <- "cyan"
col_tree_center <- "brown"
col_border_tetragon <- "blue"
col_border_pentagon <- "yellow"
col_boundaries <- "orange"
......@@ -122,6 +48,21 @@ plot_tree_plot_areas <- function(angle_counts, boundaries, tnr, enr,
xlim = c(-get_r_max() * frame_factor, get_r_max() * frame_factor),
ylim = c(-get_r_max() * frame_factor, get_r_max() * frame_factor),
xlab = "x [cm]", ylab = "y [cm]")
if (!is.null(bnr)) {
trees <- trees[trees[[o_a[["tree_id"]]]] == bnr, TRUE]
col_eff <- "green4"
col_tree <- "red"
col_eff_b <- "green4"
col_tree_b <- "red"
is_single_tree <- TRUE
} else {
col_eff <- NA
col_tree <- NA
col_eff_b <- "green4"
col_tree_b <- "red"
is_single_tree <- FALSE
}
for (i in 1:nrow(trees)) {
tree <- trees[i, TRUE]
tree[, c("x", "y")] <- bwi2cartesian(tree[[o_a[["azimuth"]]]],
......@@ -132,16 +73,16 @@ plot_tree_plot_areas <- function(angle_counts, boundaries, tnr, enr,
b <- boundaries2polygons(bounds)
pc <- get_partial_circle(circ, b)
plot(sf::st_polygon(list(circ)), border = col_tree, col = NA,
plot(sf::st_polygon(list(circ)), border = col_tree_b, col = col_tree,
add = TRUE)
if (TRUE) {
plot(pc, add = TRUE, border = col_eff_b, col = col_eff)
if (is_single_tree) {
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
} else {
tree_basal_area <- circle2polygon(c(x = tree[["x"]], y = tree[["y"]]),
tree[[o_a[["dbh"]]]]/10)
plot(sf::st_polygon(list(tree_basal_area)), add = TRUE, border = "black", col = "brown")
} else {
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
}
plot(pc, add = TRUE, border = col_eff, col = NA)
plot(sf::st_polygon(b), add = TRUE, border = col_boundaries)
graphics::abline(h = 0, col = col_plot1)
graphics::abline(v = 0, col = col_plot1)
......@@ -154,15 +95,19 @@ plot_tree_plot_areas <- function(angle_counts, boundaries, tnr, enr,
col = c(col_border_tetragon, col_border_pentagon))
bl <- get_boundary_polygons(bounds)
text(x = tree[["x"]], y = tree[["y"]],
labels = tree[[o_a[["tree_id"]]]], adj = c(0, 1))
res <- c(res, get_correction_factor(tree, bl)[["correction_factor"]])
if (isTRUE(use_sub)) {
graphics::title(main = paste("tract:", tnr, "corner:", enr))
graphics::title(main = paste("tract:", tnr, "corner:", enr))
if (isTRUE(is_single_tree)) {
graphics::title(sub = paste("bnr:", tree[[o_a[["tree_id"]]]],
"/ dbh:", tree[[o_a[["dbh"]]]],
"/ correction factor:", res))
} else {
graphics::title(main = paste("tract:", tnr, "corner:", enr))
text(x = tree[["x"]], y = tree[["y"]],
labels = tree[[o_a[["tree_id"]]]], adj = c(0, 1))
}
}
return(res)
}
......
......@@ -7,28 +7,16 @@ enr <- 4
bnr <- 3
trees <- bw2bwi2022de(get0(data("trees", package = "treePlotArea")))
trees <- select_valid_angle_count_trees(trees)
trees <- trees[trees[["tnr"]] == tnr & trees[["enr"]] == enr, TRUE]
boundaries <- get(data("boundaries", package = "treePlotArea"))
bounds <- boundaries[boundaries$tnr == tnr & boundaries$enr == enr, TRUE]
result <- plot_tree_plot_area(angle_counts = trees, boundaries = boundaries,
tnr = tnr, enr = enr, bnr = bnr)
tree <- trees[trees[["tnr"]] == tnr & trees[["enr"]] == enr &
trees[["bnr"]] == bnr, TRUE]
bounds <- boundaries[boundaries$tnr == tnr & boundaries$enr == enr, TRUE]
expectation <- get_correction_factors(tree, bounds)
expect_identical(result$correction_factor, expectation$correction_factor)
expectation <- get_correction_factors(trees[trees$bnr == bnr, TRUE], bounds)
expect_identical(result, expectation$correction_factor)
tnr <- 10056
enr <- 4
trees <- bw2bwi2022de(get0(data("trees", package = "treePlotArea")))
trees <- select_valid_angle_count_trees(trees)
boundaries <- get(data("boundaries", package = "treePlotArea"))
result <- plot_tree_plot_areas(angle_counts = trees, boundaries = boundaries,
result <- plot_tree_plot_area(angle_counts = trees, boundaries = boundaries,
tnr = tnr, enr = enr)
trees <- trees[trees[["tnr"]] == tnr & trees[["enr"]] == enr,
TRUE]
bounds <- boundaries[boundaries$tnr == tnr & boundaries$enr == enr, TRUE]
expectation <- get_correction_factors(trees, bounds)
expect_identical(result, expectation$correction_factor)
ℹ Loading treePlotArea
<error in cleanr::check_package(".", check_return = FALSE): . /home/qwer/git/cyclops/fvafrcu/treePlotArea/R/get_correction_factors.R get_correction_factors found 6 arguments, max_num_arguments was 5
. /home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R plot_tree_plot_area found 7 arguments, max_num_arguments was 5
plot_tree_plot_area found 59 lines of code, max_lines_of_code was 50
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R plot_tree_plot_areas found 6 arguments, max_num_arguments was 5
plot_tree_plot_areas found 58 lines of code, max_lines_of_code was 50>
. /home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 80 counts 88 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 82 counts 83 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 84 counts 100 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 91 counts 83 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 95 counts 81 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 102 counts 86 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R: line 103 counts 84 characters.
/home/qwer/git/cyclops/fvafrcu/treePlotArea/R/plot_tree_plot_area.R plot_tree_plot_area found 7 arguments, max_num_arguments was 5
plot_tree_plot_area line 53: found width 88 max_line_width was 80
line 55: found width 83 max_line_width was 80
line 57: found width 100 max_line_width was 80
line 64: found width 83 max_line_width was 80
line 68: found width 81 max_line_width was 80
line 75: found width 86 max_line_width was 80
line 76: found width 84 max_line_width was 80
plot_tree_plot_area found 85 lines, max_lines was 65
plot_tree_plot_area found 85 lines of code, max_lines_of_code was 50>
filename functions line value
340 R/check_boundaries.R check_boundaries 38 0
345 R/check_boundaries.R check_boundaries 39 0
351 R/check_boundaries.R check_boundaries 40 0
361 R/check_boundaries.R check_boundaries 42 0
366 R/check_boundaries.R check_boundaries 43 0
375 R/check_boundaries.R check_boundaries 45 0
337 R/check_boundaries.R check_boundaries 38 0
341 R/check_boundaries.R check_boundaries 39 0
347 R/check_boundaries.R check_boundaries 40 0
357 R/check_boundaries.R check_boundaries 42 0
362 R/check_boundaries.R check_boundaries 43 0
371 R/check_boundaries.R check_boundaries 45 0
7 R/create_tetragon.R create_tetragon 2 0
8 R/create_triangle.R create_triangle 2 0
135 R/delete_extraneous_boundaries.R delete_extraneous_boundaries 11 0
156 R/delete_extraneous_boundaries.R delete_extraneous_boundaries 14 0
30 R/geodatic2math.R geodatic2math 3 0
283 R/get_correction_factors.R check_tree 30 0
313 R/get_correction_factors.R check_tree 34 0
325 R/get_correction_factors.R check_tree 36 0
424 R/get_correction_factors.R get_correction_factor 58 0
468 R/get_correction_factors.R get_correction_factor 72 0
470 R/get_correction_factors.R get_correction_factor 73 0
279 R/get_correction_factors.R check_tree 30 0
309 R/get_correction_factors.R check_tree 34 0
322 R/get_correction_factors.R check_tree 36 0
421 R/get_correction_factors.R get_correction_factor 58 0
463 R/get_correction_factors.R get_correction_factor 72 0
465 R/get_correction_factors.R get_correction_factor 73 0
182 R/get_intersection.R get_intersection 18 0
191 R/get_intersection.R get_intersection 19 0
200 R/get_intersection.R get_intersection 20 0
......@@ -25,14 +25,11 @@
33 R/get_polygon.R get_polygon 3 0
49 R/get_polygon.R get_polygon 4 0
220 R/orthogonal.R orthogonal 22 0
482 R/plot_tree_plot_area.R plot_tree_plot_area 78 0
485 R/plot_tree_plot_area.R plot_tree_plot_area 79 0
487 R/plot_tree_plot_area.R plot_tree_plot_area 80 0
581 R/plot_tree_plot_area.R plot_tree_plot_areas 156 0
266 R/plot_tree_plot_area.R plot_tree_plot_area 28 0
221 R/points2equation.R points2equation 22 0
229 R/points2equation.R points2equation 23 0
374 R/secant_intersections.R secant_intersections 44 0
381 R/secant_intersections.R secant_intersections 46 0
370 R/secant_intersections.R secant_intersections 44 0
377 R/secant_intersections.R secant_intersections 46 0
91 R/tree_and_boundary.R tree_and_boundary 7 0
104 R/tree_and_boundary.R tree_and_boundary 8 0
118 R/tree_and_boundary.R tree_and_boundary 9 0
......@@ -48,42 +45,42 @@
204 R/tree_and_boundary.R tree_and_boundary 20 0
222 R/tree_and_boundary.R tree_and_boundary 22 0
230 R/tree_and_boundary.R tree_and_boundary 23 0
236 R/tree_and_boundary.R tree_and_boundary 24 0
281 R/validate_data.R validate_data 29 0
289 R/validate_data.R validate_data 30 0
296 R/validate_data.R validate_data 31 0
304 R/validate_data.R validate_data 32 0
311 R/validate_data.R validate_data 33 0
322 R/validate_data.R validate_data 35 0
330 R/validate_data.R validate_data 36 0
337 R/validate_data.R validate_data 37 0
344 R/validate_data.R validate_data 38 0
355 R/validate_data.R validate_data 40 0
360 R/validate_data.R validate_data 41 0
365 R/validate_data.R validate_data 42 0
371 R/validate_data.R validate_data 43 0
378 R/validate_data.R validate_data 45 0
382 R/validate_data.R validate_data 46 0
385 R/validate_data.R validate_data 47 0
390 R/validate_data.R validate_data 48 0
395 R/validate_data.R validate_data 49 0
399 R/validate_data.R validate_data 50 0
402 R/validate_data.R validate_data 51 0
406 R/validate_data.R validate_data 52 0
411 R/validate_data.R validate_data 53 0
414 R/validate_data.R validate_data 54 0
417 R/validate_data.R validate_data 55 0
420 R/validate_data.R validate_data 56 0
423 R/validate_data.R validate_data 57 0
428 R/validate_data.R validate_data 59 0
436 R/validate_data.R validate_data 62 0
446 R/validate_data.R validate_data 65 0
450 R/validate_data.R validate_data 66 0
454 R/validate_data.R validate_data 67 0
457 R/validate_data.R validate_data 68 0
463 R/validate_data.R validate_data 70 0
467 R/validate_data.R validate_data 71 0
treePlotArea Coverage: 86.43%
235 R/tree_and_boundary.R tree_and_boundary 24 0
277 R/validate_data.R validate_data 29 0
285 R/validate_data.R validate_data 30 0
292 R/validate_data.R validate_data 31 0
300 R/validate_data.R validate_data 32 0
307 R/validate_data.R validate_data 33 0
319 R/validate_data.R validate_data 35 0
327 R/validate_data.R validate_data 36 0
334 R/validate_data.R validate_data 37 0
340 R/validate_data.R validate_data 38 0
351 R/validate_data.R validate_data 40 0
356 R/validate_data.R validate_data 41 0
361 R/validate_data.R validate_data 42 0
367 R/validate_data.R validate_data 43 0
374 R/validate_data.R validate_data 45 0
378 R/validate_data.R validate_data 46 0
381 R/validate_data.R validate_data 47 0
386 R/validate_data.R validate_data 48 0
391 R/validate_data.R validate_data 49 0
395 R/validate_data.R validate_data 50 0
399 R/validate_data.R validate_data 51 0
403 R/validate_data.R validate_data 52 0
408 R/validate_data.R validate_data 53 0
411 R/validate_data.R validate_data 54 0
414 R/validate_data.R validate_data 55 0
417 R/validate_data.R validate_data 56 0
420 R/validate_data.R validate_data 57 0
424 R/validate_data.R validate_data 59 0
432 R/validate_data.R validate_data 62 0
440 R/validate_data.R validate_data 65 0
444 R/validate_data.R validate_data 66 0
448 R/validate_data.R validate_data 67 0
451 R/validate_data.R validate_data 68 0
458 R/validate_data.R validate_data 70 0
462 R/validate_data.R validate_data 71 0
treePlotArea Coverage: 86.13%
R/get_intersection.R: 0.00%
R/tree_and_boundary.R: 0.00%
R/validate_data.R: 0.00%
......@@ -97,7 +94,7 @@ R/secant_intersections.R: 88.24%
R/get_correction_factors.R: 94.06%
R/create_triangle.R: 95.65%
R/create_tetragon.R: 96.00%
R/plot_tree_plot_area.R: 96.23%
R/plot_tree_plot_area.R: 98.59%
R/add_boundaries_to_plot.R: 100.00%
R/boundaries2coords.R: 100.00%
R/boundaries2polygons.R: 100.00%
......
── R CMD build ─────────────────────────────────────────────────────────────────
* checking for file ‘/tmp/RtmpEUs6YV/remotes5ad440d131ef/treePlotArea/DESCRIPTION’ ... OK
* checking for file ‘/tmp/RtmpKkh1ns/remotes35e6157d54e8/treePlotArea/DESCRIPTION’ ... OK
* preparing ‘treePlotArea’:
* checking DESCRIPTION meta-information ... OK
* checking vignette meta-information ... OK
......
......@@ -7,7 +7,7 @@
* building ‘treePlotArea_1.4.1.9000.tar.gz’
Running /home/qwer/svn/R/r-devel/build/bin/R CMD INSTALL \
/tmp/Rtmpdl03bP/treePlotArea_1.4.1.9000.tar.gz --install-tests
/tmp/Rtmpk9Q6lI/treePlotArea_1.4.1.9000.tar.gz --install-tests
* installing to library ‘/home/qwer/svn/R/r-devel/build/library’
* installing *source* package ‘treePlotArea’ ...
** using staged installation
......
......@@ -187,15 +187,12 @@ NO COPY: inst/tinytest/test_get_boundary_radius.R:2:4: style: Indentation should
NO COPY: inst/tinytest/test_plot.R:2:4: style: Indentation should be 2 spaces but is 4 spaces.
pkgload::load_all()
~^
NO COPY: inst/tinytest/test_plot.R:12:20: style: Hanging indent should be 30 spaces but is 20 spaces.
NO COPY: inst/tinytest/test_plot.R:14:20: style: Hanging indent should be 30 spaces but is 20 spaces.
tnr = tnr, enr = enr, bnr = bnr)
^~~~~~~~~~~
NO COPY: inst/tinytest/test_plot.R:14:14: style: Indentation should be 16 spaces but is 14 spaces.
trees[["bnr"]] == bnr, TRUE]
^~~
NO COPY: inst/tinytest/test_plot.R:28:20: style: Hanging indent should be 31 spaces but is 20 spaces.
NO COPY: inst/tinytest/test_plot.R:20:20: style: Hanging indent should be 30 spaces but is 20 spaces.
tnr = tnr, enr = enr)
^~~~~~~~~~~~
^~~~~~~~~~~
NO COPY: inst/tinytest/test_throw.R:2:4: style: Indentation should be 2 spaces but is 4 spaces.
pkgload::load_all(".")
~^
......@@ -895,112 +892,148 @@ NO COPY: R/orthogonal.R:24:8: style: Indentation should be 4 spaces but is 8 spa
NO COPY: R/orthogonal.R:27:4: style: Indentation should be 2 spaces but is 4 spaces.
}
~^
NO COPY: R/plot_tree_plot_area.R:24:4: style: Indentation should be 2 spaces but is 4 spaces.
options <- get_options("all")
NO COPY: R/plot_tree_plot_area.R:27:33: style: Hanging indent should be 32 spaces but is 33 spaces.
frame_factor = 1, use_sub = NULL) {
^
NO COPY: R/plot_tree_plot_area.R:28:4: style: Indentation should be 2 spaces but is 4 spaces.
if (!is.null(use_sub)) warning("Argument `use_sub` is deprecated.")
~^
NO COPY: R/plot_tree_plot_area.R:36:4: style: Indentation should be 2 spaces but is 4 spaces.
tree <- angle_counts[angle_counts[[o_a[["tract_id"]]]] == tnr &
NO COPY: R/plot_tree_plot_area.R:39:4: style: Indentation should be 2 spaces but is 4 spaces.
trees <- angle_counts[angle_counts[[o_a[["tract_id"]]]] == tnr &
~^
NO COPY: R/plot_tree_plot_area.R:37:25: style: Indentation should be 27 spaces but is 25 spaces.
angle_counts[[o_a[["corner_id"]]]] == enr &
^~~
NO COPY: R/plot_tree_plot_area.R:39:21: style: Hanging indent should be 25 spaces but is 21 spaces.
TRUE]
^~~~~
NO COPY: R/plot_tree_plot_area.R:40:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:40:26: style: Indentation should be 28 spaces but is 26 spaces.
angle_counts[[o_a[["corner_id"]]]] == enr,
^~~
NO COPY: R/plot_tree_plot_area.R:41:22: style: Hanging indent should be 26 spaces but is 22 spaces.
TRUE]
^~~~~
NO COPY: R/plot_tree_plot_area.R:42:4: style: Indentation should be 2 spaces but is 4 spaces.
bounds <- boundaries[boundaries[[o_b[["tract_id"]]]] == tnr &
~^
NO COPY: R/plot_tree_plot_area.R:41:25: style: Indentation should be 27 spaces but is 25 spaces.
NO COPY: R/plot_tree_plot_area.R:43:25: style: Indentation should be 27 spaces but is 25 spaces.
boundaries[[o_b[["corner_id"]]]] == enr,
^~~
NO COPY: R/plot_tree_plot_area.R:42:21: style: Hanging indent should be 25 spaces but is 21 spaces.
NO COPY: R/plot_tree_plot_area.R:44:21: style: Hanging indent should be 25 spaces but is 21 spaces.
TRUE]
^~~~~
NO COPY: R/plot_tree_plot_area.R:43:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:45:4: style: Indentation should be 2 spaces but is 4 spaces.
bounds <- get_current_boundaries(bounds)
~^
NO COPY: R/plot_tree_plot_area.R:46:4: style: Indentation should be 2 spaces but is 4 spaces.
circ <- tree2polygon(tree)
~^
NO COPY: R/plot_tree_plot_area.R:52:4: style: Indentation should be 2 spaces but is 4 spaces.
plot(0, 0, col = col_plot1, pch = "+",
NO COPY: R/plot_tree_plot_area.R:51:4: style: Indentation should be 2 spaces but is 4 spaces.
if (!is.null(bnr)) {
~^
NO COPY: R/plot_tree_plot_area.R:56:4: style: Indentation should be 2 spaces but is 4 spaces.
plot(sf::st_polygon(list(circ)), border = col_tree, col = col_tree,
~^
NO COPY: R/plot_tree_plot_area.R:58:4: style: Indentation should be 2 spaces but is 4 spaces.
plot(pc, add = TRUE, border = col_eff, col = col_eff)
~^
NO COPY: R/plot_tree_plot_area.R:64:4: style: Indentation should be 2 spaces but is 4 spaces.
plot(sf::st_polygon(list(circle2polygon(r = 2 * get_r_max()))), add = TRUE,
~^
NO COPY: R/plot_tree_plot_area.R:66:4: style: Indentation should be 2 spaces but is 4 spaces.
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
~^
NO COPY: R/plot_tree_plot_area.R:71:4: style: Indentation should be 2 spaces but is 4 spaces.
bl <- get_boundary_polygons(bounds)
~^
NO COPY: R/plot_tree_plot_area.R:74:8: style: Indentation should be 4 spaces but is 8 spaces.
graphics::title(main = paste("tract:", tnr, "corner:", enr, "tree:",
NO COPY: R/plot_tree_plot_area.R:52:8: style: Indentation should be 4 spaces but is 8 spaces.
trees <- trees[trees[[o_a[["tree_id"]]]] == bnr, TRUE]
~~~^
NO COPY: R/plot_tree_plot_area.R:77:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:58:4: style: Indentation should be 2 spaces but is 4 spaces.
} else {
~^
NO COPY: R/plot_tree_plot_area.R:78:8: style: Indentation should be 4 spaces but is 8 spaces.
graphics::title(main = paste("tract:", tnr, "corner:", enr, "tree:",
NO COPY: R/plot_tree_plot_area.R:59:8: style: Indentation should be 4 spaces but is 8 spaces.
col_eff <- NA
~~~^
NO COPY: R/plot_tree_plot_area.R:81:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:64:4: style: Indentation should be 2 spaces but is 4 spaces.
}
~^
NO COPY: R/plot_tree_plot_area.R:100:69: style: Trailing whitespace is superfluous.
plot_tree_plot_areas <- function(angle_counts, boundaries, tnr, enr,
^
NO COPY: R/plot_tree_plot_area.R:101:32: style: Hanging indent should be 33 spaces but is 32 spaces.
frame_factor = 1, use_sub = TRUE) {
^~
NO COPY: R/plot_tree_plot_area.R:102:4: style: Indentation should be 2 spaces but is 4 spaces.
options <- get_options("all")
~^
NO COPY: R/plot_tree_plot_area.R:114:4: style: Indentation should be 2 spaces but is 4 spaces.
trees <- angle_counts[angle_counts[[o_a[["tract_id"]]]] == tnr &
~^
NO COPY: R/plot_tree_plot_area.R:115:25: style: Indentation should be 28 spaces but is 25 spaces.
angle_counts[[o_a[["corner_id"]]]] == enr,
^~~~
NO COPY: R/plot_tree_plot_area.R:116:21: style: Hanging indent should be 26 spaces but is 21 spaces.
TRUE]
^~~~~~
NO COPY: R/plot_tree_plot_area.R:117:4: style: Indentation should be 2 spaces but is 4 spaces.
bounds <- boundaries[boundaries[[o_b[["tract_id"]]]] == tnr &
~^
NO COPY: R/plot_tree_plot_area.R:118:25: style: Indentation should be 27 spaces but is 25 spaces.
boundaries[[o_b[["corner_id"]]]] == enr,
^~~
NO COPY: R/plot_tree_plot_area.R:119:21: style: Hanging indent should be 25 spaces but is 21 spaces.
TRUE]
^~~~~
NO COPY: R/plot_tree_plot_area.R:120:4: style: Indentation should be 2 spaces but is 4 spaces.
bounds <- get_current_boundaries(bounds)
~^
NO COPY: R/plot_tree_plot_area.R:126:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:66:4: style: Indentation should be 2 spaces but is 4 spaces.
for (i in 1:nrow(trees)) {
~^
NO COPY: R/plot_tree_plot_area.R:126:15: warning: 1:nrow(...) is likely to be wrong in the empty edge case. Use seq_len(nrow(...)) instead.
NO COPY: R/plot_tree_plot_area.R:66:15: warning: 1:nrow(...) is likely to be wrong in the empty edge case. Use seq_len(nrow(...)) instead.
for (i in 1:nrow(trees)) {
^~~~~~~~~~~~~
NO COPY: R/plot_tree_plot_area.R:127:8: style: Indentation should be 4 spaces but is 8 spaces.
NO COPY: R/plot_tree_plot_area.R:67:8: style: Indentation should be 4 spaces but is 8 spaces.
tree <- trees[i, TRUE]
~~~^
NO COPY: R/plot_tree_plot_area.R:154:8: style: Indentation should be 6 spaces but is 8 spaces.
graphics::title(main = paste("tract:", tnr, "corner:", enr))
~^
NO COPY: R/plot_tree_plot_area.R:156:8: style: Indentation should be 6 spaces but is 8 spaces.
graphics::title(main = paste("tract:", tnr, "corner:", enr))
~^
NO COPY: R/plot_tree_plot_area.R:158:4: style: Indentation should be 2 spaces but is 4 spaces.
NO COPY: R/plot_tree_plot_area.R:70:8: style: Indentation should be 4 spaces but is 8 spaces.
circ <- tree2polygon(tree)
~~~^
NO COPY: R/plot_tree_plot_area.R:76:8: style: Indentation should be 4 spaces but is 8 spaces.
plot(sf::st_polygon(list(circ)), border = col_tree_b, col = col_tree,
~~~^
NO COPY: R/plot_tree_plot_area.R:78:8: style: Indentation should be 4 spaces but is 8 spaces.
plot(pc, add = TRUE, border = col_eff_b, col = col_eff)
~~~^
NO COPY: R/plot_tree_plot_area.R:79:9: style: Indentation should be 4 spaces but is 9 spaces.
if (is_single_tree) {
~~~~^
NO COPY: R/plot_tree_plot_area.R:80:12: style: Indentation should be 6 spaces but is 12 spaces.
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
~~~~~^
NO COPY: R/plot_tree_plot_area.R:80:81: style: Lines should not be more than 80 characters. This line is 88 characters.
graphics::points(tree[["x"]], tree[["y"]], pch = "+", col = col_tree_center)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
NO COPY: R/plot_tree_plot_area.R:81:8: style: Indentation should be 4 spaces but is 8 spaces.
} else {
~~~^
NO COPY: R/plot_tree_plot_area.R:82:12: style: Indentation should be 6 spaces but is 12 spaces.
tree_basal_area <- circle2polygon(c(x = tree[["x"]], y = tree[["y"]]),
~~~~~^
NO COPY: R/plot_tree_plot_area.R:82:81: style: Lines should not be more than 80 characters. This line is 83 characters.
tree_basal_area <- circle2polygon(c(x = tree[["x"]], y = tree[["y"]]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
NO COPY: R/plot_tree_plot_area.R:83:68: style: Put spaces around all infix operators.
tree[[o_a[["dbh"]]]]/10)
^
NO COPY: R/plot_tree_plot_area.R:84:12: style: Indentation should be 6 spaces but is 12 spaces.
plot(sf::st_polygon(list(tree_basal_area)), add = TRUE, border = "black", col = "brown")
~~~~~^
NO COPY: R/plot_tree_plot_area.R:84:81: style: Lines should not be more than 80 characters. This line is 100 characters.
plot(sf::st_polygon(list(tree_basal_area)), add = TRUE, border = "black", col = "brown")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
NO COPY: R/plot_tree_plot_area.R:85:8: style: Indentation should be 4 spaces but is 8 spaces.
}
~~~^
NO COPY: R/plot_tree_plot_area.R:91:8: style: Indentation should be 4 spaces but is 8 spaces.
plot(sf::st_polygon(list(circle2polygon(r = 2 * get_r_max()))), add = TRUE,
~~~^
NO COPY: R/plot_tree_plot_area.R:91:81: style: Lines should not be more than 80 characters. This line is 83 characters.
plot(sf::st_polygon(list(circle2polygon(r = 2 * get_r_max()))), add = TRUE,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
NO COPY: R/plot_tree_plot_area.R:93:8: style: Indentation should be 4 spaces but is 8 spaces.
add_boundaries_to_plot(coords)
~~~^
NO COPY: R/plot_tree_plot_area.R:95:81: style: Lines should not be more than 80 characters. This line is 81 characters.
col = c(col_border_tetragon, col_border_pentagon))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
NO COPY: R/plot_tree_plot_area.R:97:8: style: Indentation should be 4 spaces but is 8 spaces.
bl <- get_boundary_polygons(bounds)
~~~^
NO COPY: R/plot_tree_plot_area.R:99:8: style: Indentation should be 4 spaces but is 8 spaces.
res <- c(res, get_correction_factor(tree, bl)[["correction_factor"]])
~~~^
NO COPY: R/plot_tree_plot_area.R:102:24: style: Indentation should be 6 spaces but is 24 spaces.
graphics::title(sub = paste("bnr:", tree[[o_a[["tree_id"]]]],
~~~~~~~~~~~~~~~~~^
NO COPY: R/plot_tree_plot_area.R:102:81: style: Lines should not be more than 80 characters. This line is 86 characters.
graphics::title(sub = paste("bnr:", tree[[o_a[["tree_id"]]]],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
NO COPY: R/plot_tree_plot_area.R:102:86: style: Trailing whitespace is superfluous.
graphics::title(sub = paste("bnr:", tree[[o_a[["tree_id"]]]],
^
NO COPY: R/plot_tree_plot_area.R:103:81: style: Lines should not be more than 80 characters. This line is 84 characters.
"/ dbh:", tree[[o_a[["dbh"]]]],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
NO COPY: R/plot_tree_plot_area.R:103:84: style: Trailing whitespace is superfluous.
"/ dbh:", tree[[o_a[["dbh"]]]],
^
NO COPY: R/plot_tree_plot_area.R:104:36: style: Hanging indent should be 52 spaces but is 36 spaces.
"/ correction factor:", res))
^~~~~~~~~~~~~~~~~
NO COPY: R/plot_tree_plot_area.R:106:8: style: Indentation should be 4 spaces but is 8 spaces.
} else {
~~~^
NO COPY: R/plot_tree_plot_area.R:107:12: style: Indentation should be 6 spaces but is 12 spaces.
text(x = tree[["x"]], y = tree[["y"]],
~~~~~^
NO COPY: R/plot_tree_plot_area.R:109:8: style: Indentation should be 4 spaces but is 8 spaces.
}
~~~^
NO COPY: R/plot_tree_plot_area.R:110:1: style: Trailing whitespace is superfluous.
^~~~~~~~
NO COPY: R/plot_tree_plot_area.R:111:4: style: Indentation should be 2 spaces but is 4 spaces.
}
~^
NO COPY: R/plot_tree_plot_area.R:161:1: style: Trailing blank lines are superfluous.
NO COPY: R/plot_tree_plot_area.R:114:1: style: Trailing blank lines are superfluous.
^
NO COPY: R/points2equation.R:17:4: style: Indentation should be 2 spaces but is 4 spaces.
......
......@@ -19,6 +19,11 @@ Type 'q()' to quit R.
> print(roxygen2::roxygenize("."))
ℹ Loading treePlotArea
Warning: Objects listed as exports, but not present in namespace:
• plot_tree_plot_areas
Writing 'NAMESPACE'
Writing 'plot_tree_plot_area.Rd'
Deleting 'plot_tree_plot_areas.Rd'
[[1]]
[1] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/NAMESPACE"
......@@ -38,13 +43,12 @@ Type 'q()' to quit R.
[13] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/set_options.Rd"
[14] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/orthogonal.Rd"
[15] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/plot_tree_plot_area.Rd"
[16] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/plot_tree_plot_areas.Rd"
[17] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/points2equation.Rd"
[18] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/secant_intersections.Rd"
[19] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/throw.Rd"
[20] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/treePlotArea-package.Rd"
[21] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/validate_data.Rd"
[22] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/vector_length.Rd"
[16] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/points2equation.Rd"
[17] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/secant_intersections.Rd"
[18] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/throw.Rd"
[19] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/treePlotArea-package.Rd"
[20] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/validate_data.Rd"
[21] "/home/qwer/git/cyclops/fvafrcu/treePlotArea/man/vector_length.Rd"
>
>
......@@ -77,7 +77,7 @@ In addition: Warning messages:
RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry
done successfully.
RUNIT TEST PROTOCOL -- Sat Jan 20 00:53:05 2024
RUNIT TEST PROTOCOL -- Sun Jan 21 23:30:49 2024
***********************************************
Number of test functions: 8
Number of errors: 0
......@@ -105,9 +105,9 @@ Test file: inst/runit_tests/runit-get_boundary_radius.R
test_get_boundary_radius: (1 checks) ... OK (0 seconds)
---------------------------
Test file: inst/runit_tests/runit-get_correction_factors.R
test_check_tree: (2 checks) ... OK (0 seconds)
test_get_correction_factor: (1 checks) ... OK (0.03 seconds)
test_get_correction_factors: (2 checks) ... OK (10.74 seconds)
test_check_tree: (2 checks) ... OK (0.01 seconds)
test_get_correction_factor: (1 checks) ... OK (0.04 seconds)
test_get_correction_factors: (2 checks) ... OK (11.74 seconds)
---------------------------
Test file: inst/runit_tests/runit-options.R
test_options: (5 checks) ... OK (0 seconds)
......
......@@ -7,3 +7,5 @@
══ Results ═════════════════════════════════════════════════════════════════════
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 1 ]
🧿 Your tests look perfect 🧿
......@@ -20,7 +20,7 @@
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (treePlotArea)
test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 1 tests OK 59ms
test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 2 tests OK 1.6s
test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 0 tests test_get_boundary_radius.R.... 1 tests OK 0.1s
test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 0 tests test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 1 tests OK test_plot.R................... 2 tests OK 1.6s
test_throw.R.................. 0 tests test_throw.R.................. 1 tests OK 2ms
All ok, 4 results (1.7s)
All ok, 4 results (1.8s)
......
......@@ -137,7 +137,7 @@ exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1440.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1200.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk>
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 254908 bytes).
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 255111 bytes).
Transcript written on An_Introduction_to_treePlotArea.log.
This is BibTeX, Version 0.99d (TeX Live 2022/Debian)
The top-level auxiliary file: An_Introduction_to_treePlotArea.aux
......@@ -260,7 +260,7 @@ exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1000.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1440.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1200.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk>
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 271949 bytes).
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 272133 bytes).
Transcript written on An_Introduction_to_treePlotArea.log.
This is BibTeX, Version 0.99d (TeX Live 2022/Debian)
The top-level auxiliary file: An_Introduction_to_treePlotArea.aux
......@@ -368,7 +368,7 @@ exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1000.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecbx1440.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1200.600pk> </home/qwer/.texlive2022/t
exmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1728.600pk>
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 272009 bytes).
Output written on An_Introduction_to_treePlotArea.pdf (7 pages, 272227 bytes).
Transcript written on An_Introduction_to_treePlotArea.log.
Writing to file An_Introduction_to_treePlotArea.R
--- finished re-building ‘An_Introduction_to_treePlotArea.Rnw’
......
......@@ -2,16 +2,16 @@
% Please edit documentation in R/plot_tree_plot_area.R
\name{plot_tree_plot_area}
\alias{plot_tree_plot_area}
\title{Plot a Single Tree}
\title{Plot Tree Plot Area}
\usage{
plot_tree_plot_area(
angle_counts,
boundaries,
tnr,
enr,
bnr,
frame_factor = 4,
use_sub = TRUE
bnr = NULL,
frame_factor = 1,
use_sub = NULL
)
}
\arguments{
......@@ -37,18 +37,18 @@ output of
\item{enr}{Number of the tract's corner.}
\item{bnr}{Number of the corner's tree.}
\item{bnr}{If given, the number of a corner's tree.}
\item{frame_factor}{Plotting from as a factor of the tree plot area. Stick
with the default.}
\item{use_sub}{Use the subtitle (or leave it blank)? Stick with the default.}
\item{use_sub}{Deprecated.}
}
\value{
The corrections factor for the tree's plot area.
The corrections factors for the trees' plot areas.
}
\description{
Visualize a tree, it's plot area and its corner's boundaries.
Visualize a corner, its boundaries and tree plot areas.
}
\examples{
tnr <- 166
......@@ -59,4 +59,8 @@ plot_tree_plot_area(angle_counts = angle_counts,
boundaries = get(data("boundaries",
package = "treePlotArea")),
tnr = tnr, enr = enr, bnr = bnr, frame_factor = 4)
plot_tree_plot_area(angle_counts = angle_counts,
boundaries = get(data("boundaries",
package = "treePlotArea")),
tnr = tnr, enr = enr, frame_factor = 1)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_tree_plot_area.R
\name{plot_tree_plot_areas}
\alias{plot_tree_plot_areas}
\title{Plot a Set of Trees}
\usage{
plot_tree_plot_areas(
angle_counts,
boundaries,
tnr,
enr,
frame_factor = 1,
use_sub = TRUE
)
}
\arguments{
\item{angle_counts}{A \code{\link{data.frame}} containing angle counts.
It has to have columns named by the contents of
either\cr
\code{\link{get_defaults}()[["angle_counts"]]} or \cr
\code{getOption("treePlotArea")[["angle_counts"]]}.\cr
Could be
\code{bw2bwi2022de(get(data("trees", package = "treePlotArea")))}).}
\item{boundaries}{A \code{\link{data.frame}} containing boundaries.
It has to have columns named by the contents of
either\cr
\code{\link{get_defaults}()[["boundaries"]]} or \cr
\code{getOption("treePlotArea")[["boundaries"]]}.\cr
Could be
\code{get(data("boundaries", package = "treePlotArea"))} or the
output of
\code{\link{get_boundary_polygons}}.}
\item{tnr}{Number of the tract.}
\item{enr}{Number of the tract's corner.}
\item{frame_factor}{Plotting from as a factor of the tree plot area. Stick
with the default.}
\item{use_sub}{Use the subtitle (or leave it blank)? Stick with the default.}
}
\value{
The corrections factors for the trees' plot areas.
}
\description{
Visualize a corner, its boundaries and tree plot areas.
}
\examples{
tnr <- 166
enr <- 2
bnr <- 7
angle_counts <- bw2bwi2022de(get(data("trees", package = "treePlotArea")))
plot_tree_plot_areas(angle_counts = angle_counts,
boundaries = get(data("boundaries",
package = "treePlotArea")),
tnr = tnr, enr = enr)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment