latex <- kableExtra::kbl(mtcars[1:2, 1:2], format = "latex")
parsed <- parseLatex(latex)
tablepath <- path_to(parsed, is_env, envtypes = "tabular")
table <- prepare_table(parsed[[tablepath]])
path_to_index(c(4,1,1), table)
index_to_path(3, table)
ranges <- paths_to_ranges(index_to_path(3, table),
c(4,1,1), table)
lapply(ranges, get_range, items = table)
get_ranges(table, ranges)
Run the code above in your browser using DataLab