Extends the 'tidyverse' packages 'dbplyr' and 'tidyr' functionality with pivot(), i.e. spread(), and unpivot(), i.e. gather(), for reshaping remote tables. Currently only 'Microsoft SQL Server' is supported.

Build Status codecov.io

License Disclaimer

This pacakge was developed through funding and resources by the United States Veterans Health Administration and the VA Informatic and Computing Infrastructure (VINCI) by govornment employees. As such according to 17 U.S. Code ยง105 is not covered by copyright and is released to the public domain with no license restrictions. This code is released without any guarantee of suitability for any purpose.


The pivot R pacakge extends the capabilities of dbplyr to have pivot and unpivot capabilities. It currently works only for Microsoft SQL Server. For convenience it also provides extentions to the tidyr functions spread and gather to act on remote Microsoft SQL Tables without needing to collect the data first.


Pivot 18.4.17 (17 April 2018)

  • Initial Release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


18.4.17 by Andrew Redd, a year ago

Browse source code at https://github.com/cran/pivot

Authors: Andrew Redd [aut, cre] (<https://orcid.org/000-0002-6149-2438>)

Documentation:   PDF Manual  

Task views:

Unlimited license

Imports assertthat, dplyr, dbplyr, DBI, magrittr, purrr, rlang, tidyselect, tidyr, lubridate, colorspace

Suggests testthat, covr

Enhances odbc

See at CRAN