Skip to content

Commit

Permalink
Improve documentation following discussion in rstudio/rmarkdown#1954
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Nov 25, 2020
1 parent a00710b commit cf213e4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- The chunk option `collapse = TRUE` now works as expected when the chunk option `attr.*` or `class.*` is provided. By this change, The chunk option `collapse = TRUE` forces `attr.*` and `class.*` be `NULL` except for the chunk options `attr.source` and `class.source` (thanks, @aosavi @cderv @atusy, #1902 #1906).

- New links added in `?knitr::kable()` help page to the Rmarkdown Cookbook relevant pages.

# CHANGES IN knitr VERSION 1.30

## NEW FEATURES
Expand Down
13 changes: 8 additions & 5 deletions R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,22 @@
#' @param escape Boolean; whether to escape special characters when producing
#' HTML or LaTeX tables. When \code{escape = FALSE}, you have to make sure
#' that special characters will not trigger syntax errors in LaTeX or HTML.
#' @param ... Other arguments (see Examples).
#' @param ... Other arguments (see Examples and References).
#' @return A character vector of the table source code.
#' @seealso Other R packages such as \pkg{huxtable}, \pkg{xtable},
#' \pkg{kableExtra}, and \pkg{tables} for HTML and LaTeX tables, and
#' \pkg{kableExtra}, \pkg{gt} and \pkg{tables} for HTML and LaTeX tables, and
#' \pkg{ascii} and \pkg{pander} for different flavors of markdown output and
#' some advanced features and table styles.
#' some advanced features and table styles. For more on other packages for
#' creating tables, see
#' \url{https://bookdown.org/yihui/rmarkdown-cookbook/table-other.html}.
#' @note When using \code{kable()} as a \emph{top-level} expression, you do not
#' need to explicitly \code{print()} it due to R's automatic implicit
#' printing. When it is wrapped inside other expressions (such as a
#' \code{\link{for}} loop), you must explicitly \code{print(kable(...))}.
#' @references See
#' \url{https://github.com/yihui/knitr-examples/blob/master/091-knitr-table.Rnw}
#' for some examples in LaTeX, but they also apply to other document formats.
#' \url{https://bookdown.org/yihui/rmarkdown-cookbook/kable.html} for some
#' examples about this function, including specific arguments according to the
#' \code{format} selected.
#' @export
#' @examples d1 = head(iris); d2 = head(mtcars)
#' # pipe tables by default
Expand Down
13 changes: 8 additions & 5 deletions man/kable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf213e4

Please sign in to comment.