To create maps for an upcoming fieldwork you can use the function maply_tag(). You can read the help file of maply_tag() here, and you can preview the effect of changing the default behavior of this function using this online app. This blog shows the code used to maps created in January 2018. In particular it shows how to add a sufix to – exclusively – dead trees that lay on each quadrat’s edge.

Packages

library(fgeo.map)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

Data

# `sinharaja::sinh_vft_20180118` is a private dataset. Instead use your data.
vft <- sinharaja::sinh_vft_20180118
vft <- setNames(vft, tolower(names(vft)))

# Filtering only a few quadrats for this example
tricky_quadrtat_numbers <- c("0100", "0101", "1000")
vft <- filter(vft, quadratname %in% tricky_quadrtat_numbers)
vft
#> # A tibble: 1,096 x 7
#>    tag       qx    qy quadratname status censusid plotid
#>    <chr>  <dbl> <dbl> <chr>       <chr>     <int>  <int>
#>  1 010001   0.1   0.3 0100        alive         4      1
#>  2 010002   0.1   0.5 0100        alive         4      1
#>  3 010003   0.5   0.9 0100        alive         4      1
#>  4 010004   0.6   0.9 0100        alive         4      1
#>  5 010006   0.7   3.2 0100        alive         4      1
#>  6 010007   0.2   3.7 0100        alive         4      1
#>  7 010008   0.9   4.6 0100        alive         4      1
#>  8 010009   1.2   5   0100        alive         4      1
#>  9 010010   2.9   4.9 0100        alive         4      1
#> 10 010011   3.9   3.9 0100        alive         4      1
#> # ... with 1,086 more rows

Suffix dead trees on the quadrat edge

suffixed <- suffix_edge_tag(
  vft,
  .match = "dead",
  suffix = "_d",
  x_q = 20
)
#> One or more trees spillover.
# Confirm that it worked
dplyr::filter(suffixed, status == "dead", (qx > 20 | qy > 20))
#> # A tibble: 2 x 7
#>   tag         qx    qy quadratname status censusid plotid
#>   <chr>    <dbl> <dbl> <chr>       <chr>     <int>  <int>
#> 1 010342_d  20.2   3.1 0101        dead          4      1
#> 2 010544_d  20.1  17.1 0101        dead          4      1

Map

p <- maply_tag(suffixed, title_quad = "Sinharaja, 2018.", move_edge = 0.5)

Have a look

Finally, this is what the four maps of the first quadrat look like.

Further reading

Other blogs about fieldwork