available_tree: Available trees for measure and compute index.

Description Usage Arguments Examples

View source: R/border.R

Description

This function works in retangular plots and identify wich trees are available for a util plot. The border parameter set how many spatial units (i.e. meters) will be used to creates buffer offsets.

Usage

1
available_tree(x, y, border)

Arguments

x,

x numeric vector of coordinates.

border

numeric, buffer distance of boundary plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
df <- data_frame(id = 1:25) %>%
  mutate(
    x = xcoord(x = id, xspacing =  2, ncol =  5, star = "left-bottom"),
    y = ycoord(x = id, yspacing =  2, ncol =  5, star = "left-bottom")
  ) %>%
  mutate(border = available_tree(x = x, y = y, border = 1))

if (require(ggplot2)) {
 ggplot(df, aes(x, y, label = id, color = border)) +
   geom_point(size = 4)
}

italocegatta/comp3 documentation built on May 18, 2019, 5:52 a.m.