R/find_cell.R

Defines functions find_cell

Documented in find_cell

#' Returns a cell from a grid table, using row, column and name
#' for identification of selection and property.
#' @param table the grid table to search
#' @param row the desired row number, considering all grobs
#' @param col the desired column number, considering all grobs
#' @param name the desired table property, default \code{"core-fg"}.
#' @return the table cell from the grid layout
find_cell <- function(table, row, col, name = "core-fg") {
  l <- table$layout
  which(l$t == row & l$l == col & l$name == name)
}
greatgray/scorecard documentation built on May 17, 2019, 8:34 a.m.