Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 14 additions & 100 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,107 +1,21 @@
# Workflow derived from https://github.com/rstudio/shiny-workflows
#
# NOTE: This Shiny team GHA workflow is overkill for most R packages.
# For most R packages it is better to use https://github.com/r-lib/actions
on:
push:
branches:
- master
branches: [main, master, rc-**]
pull_request:
branches:
- master
branches: [main, master]
schedule:
- cron: '0 2 * * 1' # every monday

name: R-CMD-check
name: Package checks

jobs:
website:
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
routine:
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: '3.5'}
- {os: macOS-latest, r: '3.6'}
- {os: macOS-latest, r: '4.0'}
- {os: windows-latest, r: '3.6'}
- {os: windows-latest, r: '4.0'}
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-2-

- name: Problematic Pkgs
shell: Rscript {0}
run: |
remotes::install_cran("htmltools")
remotes::install_cran("ellipsis")
remotes::install_cran("pillar")
remotes::install_cran("ps")
remotes::install_cran("processx")

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
if (Sys.info()[["sysname"]] == "Windows") {
options(install.packages.compile.from.source = "never")
}
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Install rcmdcheck
shell: Rscript {0}
run: |
remotes::install_cran("rcmdcheck")

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
run: covr::codecov()
shell: Rscript {0}
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
42 changes: 0 additions & 42 deletions .github/workflows/pkgdown.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BugReports: https://github.com/rstudio/gt/issues
Encoding: UTF-8
LazyData: true
ByteCompile: true
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Depends:
R (>= 3.2.0)
Imports:
Expand Down
15 changes: 7 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
[![CRAN
status](https://www.r-pkg.org/badges/version/gt)](https://cran.r-project.org/package=gt)
[![R build
status](https://github.com/rstudio/gt/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/gt/actions?workflow=R-CMD-check)
[![R build status](https://github.com/rstudio/gt/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/gt/actions)
[![Coverage
status](https://codecov.io/gh/rstudio/gt/branch/master/graph/badge.svg)](https://codecov.io/github/rstudio/gt?branch=master)
<!-- badges: end -->
Expand All @@ -32,7 +31,7 @@ It all begins with **table data** (be it a tibble or a data frame). You then dec

<p align="center"><img src="man/figures/gt_workflow_diagram.svg" width="800px"></p>

The **gt** package is designed to be both straightforward yet powerful. The emphasis is on simple functions for the everyday display table needs. Here is a brief example of how to use **gt** to create a table from the included `sp500` dataset:
The **gt** package is designed to be both straightforward yet powerful. The emphasis is on simple functions for the everyday display table needs. Here is a brief example of how to use **gt** to create a table from the included `sp500` dataset:

```{r sp500_example, eval=FALSE}
library(gt)
Expand Down Expand Up @@ -94,7 +93,7 @@ devtools::install_github("rstudio/gt")
```

If you encounter a bug, have usage questions, or want to share ideas to make this package better, please feel free to file an [issue](https://github.com/rstudio/gt/issues).

***

#### How **gt** fits in with Other Packages that Generate Display Tables
Expand All @@ -121,11 +120,11 @@ While **gt** is trying to do something different with its own interface, it may
- **reactable**&nbsp;([GITHUB](https://github.com/glin/reactable),&nbsp;[WEBSITE](https://glin.github.io/reactable/))
- **flextable**&nbsp;([GITHUB](https://github.com/davidgohel/flextable),&nbsp;[WEBSITE](https://davidgohel.github.io/flextable/))
- **ftextra**&nbsp;([GITHUB](https://github.com/atusy/ftExtra),&nbsp;[WEBSITE](https://ftextra.atusy.net/))
- **pixiedust**&nbsp;([GITHUB](https://github.com/nutterb/pixiedust))
- **tangram**&nbsp;([GITHUB](https://github.com/spgarbet/tangram))
- **pixiedust**&nbsp;([GITHUB](https://github.com/nutterb/pixiedust))
- **tangram**&nbsp;([GITHUB](https://github.com/spgarbet/tangram))
- **ztable**&nbsp;([GITHUB](https://github.com/cardiomoon/ztable))
- **condformat**&nbsp;([GITHUB](https://github.com/zeehio/condformat))
- **stargazer**&nbsp;([CRAN](https://CRAN.R-project.org/package=stargazer))
- **condformat**&nbsp;([GITHUB](https://github.com/zeehio/condformat))
- **stargazer**&nbsp;([CRAN](https://CRAN.R-project.org/package=stargazer))
- **xtable**&nbsp;([CRAN](https://CRAN.R-project.org/package=xtable))

#### Code of Conduct
Expand Down
62 changes: 36 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![CRAN
status](https://www.r-pkg.org/badges/version/gt)](https://cran.r-project.org/package=gt)
[![R build
status](https://github.com/rstudio/gt/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/gt/actions?workflow=R-CMD-check)
status](https://github.com/rstudio/gt/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/gt/actions)
[![Coverage
status](https://codecov.io/gh/rstudio/gt/branch/master/graph/badge.svg)](https://codecov.io/github/rstudio/gt?branch=master)
<!-- badges: end -->
Expand All @@ -20,7 +20,9 @@ These include the *table header*, the *stub*, the *column labels* and
*spanner column labels*, the *table body*, and the *table footer*.

<p align="center">

<img src="man/figures/gt_parts_of_a_table.svg" width="800px">

</p>

It all begins with **table data** (be it a tibble or a data frame). You
Expand All @@ -31,7 +33,9 @@ or exporting to a file using `gtsave()`. Currently, **gt** supports the
**HTML**, **LaTeX**, and **RTF** output formats.

<p align="center">

<img src="man/figures/gt_workflow_diagram.svg" width="800px">

</p>

The **gt** package is designed to be both straightforward yet powerful.
Expand Down Expand Up @@ -73,7 +77,9 @@ sp500 %>%
```

<p align="center">

<img src="man/figures/gt_sp500_table.svg" width="1200px">

</p>

There are six datasets included in **gt**: `countrypops`, `sza`,
Expand All @@ -87,9 +93,11 @@ Want to try this out? Then, take the **gt** Test Drive on **RStudio
Cloud**. It’s full of ready-to-run examples.

<p align="center">

<a href="https://rstudio.cloud/project/779965">
<img src="man/figures/gt-test-drive.svg" alt="RStudio Cloud Example" height="80px">
</a>

</p>

The **gt** package can be installed from **CRAN** with:
Expand All @@ -109,7 +117,7 @@ If you encounter a bug, have usage questions, or want to share ideas to
make this package better, please feel free to file an
[issue](https://github.com/rstudio/gt/issues).

------------------------------------------------------------------------
-----

#### How **gt** fits in with Other Packages that Generate Display Tables

Expand All @@ -118,20 +126,20 @@ table generation. Why another? We feel that there is enough room in this
space to innovate further. Here are some of the ways that **gt**
contributes to this ecosystem:

- the interface is high-level and declarative (general instructions
- the interface is high-level and declarative (general instructions
versus very specific)
- the formatting options are ‘batteries included’ (scientific
- the formatting options are ‘batteries included’ (scientific
notation, uncertainty, ranges, percentages, suffixes, localized
currency, dates/times + much more)
- there is excellent, pain-free support for footnotes
- the output is ‘camera-ready’
- multiple output formats are supported with the same declarative
- there is excellent, pain-free support for footnotes
- the output is ‘camera-ready’
- multiple output formats are supported with the same declarative
interface
- the API closely follows tidyverse conventions by adhering to the
- the API closely follows tidyverse conventions by adhering to the
[tidyverse style guide](https://style.tidyverse.org)
- there’s a focus on making the package documentation and examples the
- there’s a focus on making the package documentation and examples the
best they can be
- rigorous QA/QC measures: high test coverage for automated tests, and
- rigorous QA/QC measures: high test coverage for automated tests, and
thorough manual testing by QA engineers (with every proposed code
change)

Expand All @@ -140,21 +148,21 @@ it may not suit your specific needs. Here is a listing of other leading
table-making **R** packages, with links to their respective project
pages:

- **knitr** ([GITHUB](https://github.com/yihui/knitr), [WEBSITE](https://yihui.org/knitr/))
- **kableExtra** ([GITHUB](https://github.com/haozhu233/kableExtra), [WEBSITE](https://haozhu233.github.io/kableExtra/))
- **formattable** ([GITHUB](https://github.com/renkun-ken/formattable), [WEBSITE](https://renkun-ken.github.io/formattable/))
- **DT** ([GITHUB](https://github.com/rstudio/DT), [WEBSITE](https://rstudio.github.io/DT/))
- **pander** ([GITHUB](https://github.com/Rapporter/pander), [WEBSITE](http://rapporter.github.io/pander))
- **huxtable** ([GITHUB](https://github.com/hughjonesd/huxtable), [WEBSITE](https://hughjonesd.github.io/huxtable/))
- **reactable** ([GITHUB](https://github.com/glin/reactable), [WEBSITE](https://glin.github.io/reactable/))
- **flextable** ([GITHUB](https://github.com/davidgohel/flextable), [WEBSITE](https://davidgohel.github.io/flextable/))
- **ftextra** ([GITHUB](https://github.com/atusy/ftExtra), [WEBSITE](https://ftextra.atusy.net/))
- **pixiedust** ([GITHUB](https://github.com/nutterb/pixiedust))
- **tangram** ([GITHUB](https://github.com/spgarbet/tangram))
- **ztable** ([GITHUB](https://github.com/cardiomoon/ztable))
- **condformat** ([GITHUB](https://github.com/zeehio/condformat))
- **stargazer** ([CRAN](https://CRAN.R-project.org/package=stargazer))
- **xtable** ([CRAN](https://CRAN.R-project.org/package=xtable))
- **knitr** ([GITHUB](https://github.com/yihui/knitr), [WEBSITE](https://yihui.org/knitr/))
- **kableExtra** ([GITHUB](https://github.com/haozhu233/kableExtra), [WEBSITE](https://haozhu233.github.io/kableExtra/))
- **formattable** ([GITHUB](https://github.com/renkun-ken/formattable), [WEBSITE](https://renkun-ken.github.io/formattable/))
- **DT** ([GITHUB](https://github.com/rstudio/DT), [WEBSITE](https://rstudio.github.io/DT/))
- **pander** ([GITHUB](https://github.com/Rapporter/pander), [WEBSITE](http://rapporter.github.io/pander))
- **huxtable** ([GITHUB](https://github.com/hughjonesd/huxtable), [WEBSITE](https://hughjonesd.github.io/huxtable/))
- **reactable** ([GITHUB](https://github.com/glin/reactable), [WEBSITE](https://glin.github.io/reactable/))
- **flextable** ([GITHUB](https://github.com/davidgohel/flextable), [WEBSITE](https://davidgohel.github.io/flextable/))
- **ftextra** ([GITHUB](https://github.com/atusy/ftExtra), [WEBSITE](https://ftextra.atusy.net/))
- **pixiedust** ([GITHUB](https://github.com/nutterb/pixiedust))
- **tangram** ([GITHUB](https://github.com/spgarbet/tangram))
- **ztable** ([GITHUB](https://github.com/cardiomoon/ztable))
- **condformat** ([GITHUB](https://github.com/zeehio/condformat))
- **stargazer** ([CRAN](https://CRAN.R-project.org/package=stargazer))
- **xtable** ([CRAN](https://CRAN.R-project.org/package=xtable))

#### Code of Conduct

Expand All @@ -169,8 +177,10 @@ participating in this project you agree to abide by its terms.

© RStudio, PBC.

------------------------------------------------------------------------
-----

<p align="center">

<img src="man/figures/gt_tables_footer.png" width="100%">

</p>
8 changes: 1 addition & 7 deletions man/gt-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.