/htmlRd

Convert Shiny HTML tags into Rd format

Primary LanguageR

htmlRd

Travis build status Coverage status

The goal of htmlRd is to provide methods for converting htmltools shiny.tag objects into Rd.

Installation

You can install the released version of htmlRd from CRAN with:

install.packages("htmlRd")

Example

This is a basic example which shows you how to solve a common problem:

html <- with(htmltools::tags, {
    div( h1("Converting HTML to Rd")
       , p("Currently "
          , code(a("htmlRd", href="https://github.com/RDocTaskForce/htmlRd"))
          , " only supports HTML tags found in the "
          , em("body"), " of the document."
          )
       )
})
html

Converting HTML to Rd

Currently htmlRd only supports HTML tags found in the body of the document.

toRd(html)
#> \section{Converting HTML to Rd}{
#> Currently \code{\href{{https://github.com/RDocTaskForce/htmlRd}{htmlRd}}} only supports HTML tags found in the \emph{body} of the document.
#> }

Acknowledgements

The testextra package is developed by the R Documentation Task Force, an R Consortium Infrastructure Steering Committee working group.