项目作者: lwjohnst86

项目描述 :
Easily make descriptive statistics tables
高级语言: R
项目地址: git://github.com/lwjohnst86/carpenter.git
创建时间: 2016-05-13T17:42:12Z
项目社区:https://github.com/lwjohnst86/carpenter

开源协议:Other

下载


" class="reference-link">carpenter: Making Tables

Travis-CI Build
Status
CRAN Status
Badge
Coverage
status
AppVeyor build
status
lifecycle
Downloads

The main goal of carpenter to simplify making those pesky
descriptive/basic characteristic tables often used in biomedical journal
articles. It was designed to work well within the tidyverse ecosystem,
e.g. relying on using pipes to chain functions together or having
multiple, dedicated functions to use (rather than a monolithic one with
lots of arguments).

Installation

This package is on CRAN, so install using:

  1. install.packages('carpenter')

For the developmental version, install from GitHub:

  1. # install.packages("remotes")
  2. remotes::install_github('lwjohnst86/carpenter')

Example usage

Here is an example workflow for making tables:

  1. library(carpenter)
  2. outline_table(iris, 'Species') %>%
  3. add_rows('Sepal.Length', stat_meanSD) %>%
  4. add_rows('Petal.Length', stat_meanSD) %>%
  5. add_rows('Sepal.Width', stat_medianIQR) %>%
  6. build_table()
Variables setosa versicolor virginica
Sepal.Length 5.0 (0.4) 5.9 (0.5) 6.6 (0.6)
Petal.Length 1.5 (0.2) 4.3 (0.5) 5.6 (0.6)
Sepal.Width 3.4 (3.2-3.7) 2.8 (2.5-3.0) 3.0 (2.8-3.2)

For a more detailed view of how to use carpenter, see ?carpenter or
vignette('carpenter'). Or view the vignette directly
here

Resources

There are several packages out there that help with making tables. Most
of them work to output and customize the tables into a given format, for
instance markdown or html, but assume the data is in the form you
already want to present it in. So they don’t help with getting the data
into the form of a table (in the context of descriptive/basic
characteristic tables often seen in biomedical research). Even still,
they are very useful to look over and learn about!