rspivot

Introduction

rspivot is a Shiny gadget for RStudio for viewing data frames.

The View() function in RStudio displays data frames and tibbles as they are stored in the R environment: flat files of many rows and columns. Though View() provides the ability to filter series using a single parameter or value range, it lacks many tools necessary for properly examing output. rspivot() provides an alternative to View() by viewing data frames and tibbles as interactive pivot tables.

Key features of rspivot() include:

  • Row, nested row, and column selection - the table summarizes over data values not explicitly shown in the table
  • Summarizing data using sum, mean, count, and other common functions
  • Marginal totals for rows, nested rows, and columns
  • Data transformations including %Growth, %Shares, and differences
  • Resuming the selected filters and data metrics using the save feature

Although rspivot() provides some calculations, like the View() function, rspivot() should be used to examine and review the results of analysis. For this reason, the goal is to keep the functionality of the gadget to a minimum, encouraging the user to use tidyverse for the bulk of analysis.

See my GitHub for the script and GitHub.io for latest updates and examples.

Installation

This package requires RStudio and is built using the tidyverse and shiny packages.

rspivot is not yet on CRAN, but you can install the latest development version from GitHub. It is recommended that you reinstall it at least every week until the first stable release.

#install.packages(devtools)
devtools::install_github("ryantimpe/rspivot")

Built With

rspivot uses Shiny to control a hierarchy of tidyverse commands to filter, mutate, and summarize a data frame. The output of those functions is displayed using an rhandsontable table and ggplot2 charts.

Versioning

Once the first version is released, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

GPL-3

Avatar
Ryan Timpe
Data Science | Economics