-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
73 lines (47 loc) · 1.72 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
63
64
65
66
67
68
69
70
71
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# forgts <img src="man/figures/logo.png" align="right" height="138" alt="" />
<!-- badges: start -->
<!-- badges: end -->
forgts reads a spreadsheet and its formatting information to produce gt tables with the same cell and text formatting as the input file.
Text and cell formats supported include:
- font face (bold, italic)
- font style (color, underline, strikethrough)
- cell fill
- cell borders (color and width)
Note that formatting in the headers is ignored intentionally in this package, and that the cell and text formatting is added iteratively on top of gt defaults.
## Installation
Install the development version of forgts from GitHub:
``` r
# install.packages("remotes")
remotes::install_github("luisDVA/forgts")
```
## Using forgts
The `rodentsheet.xlsx` file that comes with this package looks like this:
```{r, echo=FALSE, eval=TRUE, fig.align='center', out.width="70%"}
knitr::include_graphics("man/figures/spsheetog.png", error = FALSE)
```
<br/>
The function `forgts` will read the file and produce a gt object (shown here as an image).
```{r example, echo=TRUE, eval=FALSE}
library(forgts)
###
example_spreadsheet <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
forgts(example_spreadsheet)
```
<br/>
```{r, echo=FALSE, eval=TRUE, fig.align='center', out.width="70%"}
knitr::include_graphics("man/figures/rdout.png")
```
<br/>
`forgts()` may be used in RMarkdown and Quarto documents, and the resulting gt tables may be exported with `gt::gtsave()`.