Skip to content
An updated version of qwraps with a focus on flexibility and general purpose. These functions are helpful for extracting and formatting results from R into .Rnw or .Rmd files. Additional functions for routine work such as extracting results from regression models or finding sensitivity and specificity.
R C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
inst/templates fix #61 Dec 28, 2018
tests comment out a test that fails under R-devel, this test isn't needed r… Mar 6, 2019
.travis.yml spelling correction Apr 23, 2019
DESCRIPTION add backtick Mar 22, 2019
NAMESPACE update version number Mar 15, 2019 close #63, #64: removed create_pkg... not going to use, not going to … Dec 28, 2018
codecov.yml added code coverage Sep 22, 2016
qwraps2.Rproj added notes about how to clone the project on windows and add the .Rp… Nov 3, 2017


Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status Coverage Status

CRAN_Status_Badge CRAN RStudio mirror downloads CRAN RStudio mirror downloads

Licence minimal R version

A collection of helpful functions for summarizing data and formatting results. These or similar functions can be found in other R packages on or on CRAN. However, this is a collection of methods I have generated to help with particular projects I have worked on over the last several years. Using my original qwraps package as the foundation, this work is aimed at simplicity and ease of use.

Some of the tools provided by qwraps2 are:

  • Formatting results:

    • frmt, frmtci, and frmtp make it easier to consistently formate numeric values, confidence intervals, and p-values in reports.
    • qable is a wrapper around knitr::kable with my preferred defaults.
    • summary_table is used to generate data summary tables in markdown or LaTeX with the look of well formatted tables from the xtables or Hmisc::latex.
    • mean_ci, mean_sd, median_iqr, n_perc make it easy to report formated summary statistics.
  • Plotting: Tools for building specific types of plots in ggplot2

    • qacf: Autocorrelation plots
    • qblandaltman: Bland Altman plots
    • qkmplot: Kaplan-Meier plots
    • qroc: Receiver Operator Curves
    • ggplot2_extract_legend: extract the legend from a ggplot.
  • R Programing and Development

    • lazyload_cache Load the cache generated by knitr into an interactive session.
  • Other Tools:

    • confusion_matrix: building and generate statistics for confusion matrices.
    • logit and invlogit: quick logit and inverse logit functions
    • ll: a variant for ls()


If you have a particular task or function used for data summaries or for reporting that you think would be helpful to include in this package please fork the repo, add the feature, and send me a pull request.

Cloning the repo

IMPORTANT NOTE FOR WINDOW USERS This package uses soft links. Those on unix-like systems, this shouldn't be an issue. If you are on windows then you will need to clone, or re-clone, the repository using

# Using https
git clone -c core.symlinks=true

# Using ssh
git clone -c core.symlinks=true

Building the package

Use the makefile. RStudio users, you will find a qwraps2.Rproj that will set the default to use the makefile in the build. My prefered IDE is neovim with the Nvim-R plugin and I prefer to work on a Debian system. After cloning the repo, a simple call


will build the package. This includes generating man files via roxygen2, building the vignettes, and then building the package via R CMD build .. Passing arguments to R CMD build can be done too. For example, building the package without the vignettes is done via:

make build-options=--no-build-vignettes



Download and install from The Comprehensive R Archive Network (CRAN).

install.packages("qwraps2", repo = "")


Install the development version of qwraps2 directly from github via the devtools package:

if (!("devtools" %in% rownames(installed.packages()))) { 
  warning("installing devtools from")
  install.packages("devtools", repo = "")

devtools::install_github("dewittpe/qwraps2", build_vignettes = TRUE)

NOTE: If you are working on a Windows machine you will need to download and install Rtools before devtools will work for you.

Cloned repo

Install with GNU make

make install
You can’t perform that action at this time.