This function can be used in a R markdown code chunk with the chunk option results = "asis".

tex_listing(object, caption = NULL, label = NULL, clearpage = TRUE)

Arguments

object

The object for which the summary is to be listed

caption

An optional caption

label

An optional label

clearpage

Should a new page be started after the listing?