R/get_noneInteractiveGrobs_index.R

Defines functions get_noneInteractiveGrobs_index

get_noneInteractiveGrobs_index <- function(loon.grobs) {

  n <- length(loon.grobs)
  id <- sapply(1:n,
               function(i){
                 loon.grob <- loon.grobs[[i]]
                 if(grepl(grid::grobName(loon.grob), pattern = "gTree")) NA else i
               }
  )
  id[which(!is.na(id))]
}
great-northern-diver/loon.shiny documentation built on Oct. 24, 2022, 3:32 a.m.