-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
62 lines (43 loc) · 2.43 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
58
59
60
61
62
---
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%"
)
```
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/poissonconsulting/subreport/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/subreport/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/subreport/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/subreport)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
<!-- badges: end -->
# subreport
`subreport` is an R package to generate `.html` results reports and custom markdown for tables, figures (plots, windows and png files) and (code) blocks saved using the [subfoldr2](https://github.com/poissonconsulting/subreport) package.
The `sbr_knit_results()` function allows the user to view a .html report with all the tables, figures and blocks while the `sbr_tables()`, `sbr_figures()` and `sbr_blocks()` functions produce markdown code complete with headings, numbered labels and captions of their respective objects.
The `sbr_n()` and `sbr_s()` functions allow numbers and strings to be inserted into .Rmd reports.
## Usage
```{r}
library(subfoldr2)
library(subreport)
sbf_set_main(tempdir(), "output")
sbr_set_report(tempdir(), "report")
y <- data.frame(t = 2, comment = "blah blah")
sbf_save_table(y, sub = "Factoids", caption = "A really interesting summary")
cat(sbr_tables())
```
## Installation
To install the latest development version from GitHub [repository](https://github.com/poissonconsulting/subreport)
``` r
# install.packages("remotes")
remotes::install_github("poissonconsulting/subreport")
```
## Contribution
Please report any [issues](https://github.com/poissonconsulting/subreport/issues).
[Pull requests](https://github.com/poissonconsulting/subreport/pulls) are always welcome.
## Code of Conduct
Please note that the subreport project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.