Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmurdoch/tables
Formula-Driven Table Generation
https://github.com/dmurdoch/tables
Last synced: about 22 hours ago
JSON representation
Formula-Driven Table Generation
- Host: GitHub
- URL: https://github.com/dmurdoch/tables
- Owner: dmurdoch
- Created: 2023-02-10T11:26:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-04T08:29:29.000Z (5 months ago)
- Last Synced: 2024-06-11T17:56:27.451Z (5 months ago)
- Language: R
- Homepage: https://dmurdoch.github.io/tables/
- Size: 5.42 MB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---[![R-CMD-check](https://github.com/dmurdoch/tables/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dmurdoch/tables/actions/workflows/R-CMD-check.yaml)
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# tables
The goal of tables is to compute and display complex tables of summary statistics.
Output may be in LaTeX, HTML, plain text, or an R
matrix for further processing.## Installation
You can install the release version of `orientlib` using
``` r
install.packages("tables")
```You can install the development version of tables from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("dmurdoch/tables")
```## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(tables)set.seed(123)
# In an R Markdown document, you don't want each table
# to output the HTML document header, so turn
# off that option:table_options(htmloptions(head=FALSE))
X <- rnorm(125, sd=100)
Group <- factor(sample(letters[1:5], 125, replace = TRUE))
tab <- tabular( Group ~
(N=1) +
Format(digits=2)*X*
((Mean=mean) +
Heading("Std Dev")*sd)
)# To print in plain text:
tab# To format in HTML:
toHTML(tab)
```
```{r}
# To generate LaTeX code:
strsplit(toLatex(tab)$text, "\n")
```