R/list_field_stems.R

Defines functions list_field_stems

Documented in list_field_stems

#' @title List images that overlap with field-collected stems
#' @description The field collected stems are individual points for each tree. They overlap with a subset of the sensor data. Use this function to determine which plots have stem data.
#' @rdname list_field_stems
#' @export
list_field_stems<-function(){
  RGB_DIR <- paste(system.file("extdata", "NeonTreeEvaluation/evaluation/RGB/", package = "NeonTreeEvaluation"))
  rgb_images<-list.files(RGB_DIR,full.names = T)
  plots <- as.character(unique(NeonTreeEvaluation::field$plotID))
  available<-sapply(plots, function(x){
    sum(stringr::str_detect(rgb_images,x)) == 1
  })
  return(plots[available])
}
weecology/NeonTreeEvaluation_package documentation built on Aug. 27, 2024, 10:53 a.m.