-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
57 lines (45 loc) · 1.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(htmlRd)
```
# htmlRd
[![Travis build status](https://travis-ci.org/RDocTaskForce/htmlRd.svg?branch=master)](https://travis-ci.org/RDocTaskForce/htmlRd)
[![Coverage status](https://codecov.io/gh/RDocTaskForce/htmlRd/branch/master/graph/badge.svg)](https://codecov.io/github/RDocTaskForce/htmlRd?branch=master)
The goal of htmlRd is to provide methods for converting
[htmltools](https://cran.r-project.org/package=htmltools)
shiny.tag objects into Rd.
## Installation
You can install the released version of htmlRd from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("htmlRd")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
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
```
```{r}
toRd(html)
```
## Acknowledgements
The `testextra` package is developed by the R Documentation Task Force,
an [R Consortium](https://www.r-consortium.org)
[Infrastructure Steering Committee working group](https://www.r-consortium.org/projects/isc-working-groups).