View data frames as Shiny pivot tables. This is an alternative to View() to view data frames as summarized data. Additional options include sparklines and charts and multiple data metrics.

rspivot(df = .Last.value, valueName = "value", initCols = "",
  initRows = "", initNest = "", initFilters = list(),
  initPivotValues = "sum", initMetric = list(metric = "Values", series =
  ""), launch.browser = FALSE)



A data frame flat file to be converted to pivot format. Data should be in "long" format, with a single column of values named value. The function defaults to showing the most recent object made in R.


Name of series in df containing data values. Defaults to "value". Can also accept an array of strings containing the names of multiple value columns in the data frame.


Specify the series to be displayed as columns. If blank, defaults to the right-most series in the data frame.


Specify the series to be displayed as rows. If blank, defaults to the 2nd right-most series in the data frame.


Specify the series to be displayed as nested rows. If blank, no nested rows are displayed.


Optional list of initial filter selections. Leave a series blank or use "Show All" to select all. Pass series names to make.names() to ensure correct use. Alternatively, leave this blank on the intiial run, and use the Save Function feature after manually selecting filters.


Summary values to display in the pivot table. Default is "sum", showing the total values of the underlying data. Other options are "mean", "median", "min", "max", and "count". Can also accept customize, one-input summary functions.


Optional list of the initial data metrics to display, after data is summarized using initPivotValues.


If TRUE, the system's default web browser will be launched automatically after the app is started.



rspivot(iris, valueName = names(iris)[1:4])
# }