R/HTMLfootnotes.R

Defines functions HTMLfootnotes

Documented in HTMLfootnotes

HTMLfootnotes <- function(tab, ...) {
  notes <- list(...)
  names <- names(notes)
  if (is.null(names))
    markers <- rep("", length(notes))
  else
    markers <- paste0('<sup>', names, '</sup>')
  notes <- unlist(notes)
  paste0('<tr><td colspan=', ncol(tab) + ncol(rowLabels(tab)), '>',
         paste0(markers, notes, collapse = '<br>\n'),
         '</td></tr>\n')
}

Try the tables package in your browser

Any scripts or data that you put into this service are public.

tables documentation built on May 3, 2023, 1:15 a.m.