I'm wanting to try using markdown in .Rd files. I think I get that @md at the end of the documentation for a function makes it parse markdown. But not see this table appear, nor is the raw text appearing... Does roxygen support tables?
#' makes bar
#' @description
#' prints 2 x
#' @details see this table
#'
#' |a |b |c |
#' |--|--|--|
#' |1 |3 |4 |
#'
#' @param x how much foo
#' @return -
#' @export
#' @family tmp
#' @examples
#' foo(2)
#' @md
foo <- function(x) {
print(2 * x)
}
There is now support for markdown tables in roxygen2 since the 7.0.0 version (on CRAN since 2019-11-12):
Markdown tables are converted to a \tabular{} macro (#290). roxygen2 supports the GFM table syntax which looks like this:
| foo | bar | | --- | --- | | baz | bim |
You can read more about this in the dedicated roxygen2 vignette.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With