I could not figured out how to save the output of rpivottable in shiny. My minimum working example is below for reference.
library(tidyverse)
library(shiny)
library(shinydashboard)
ui <-
dashboardPage(
skin = "green",
dashboardHeader(
title = "Test",
titleWidth = 280
),
dashboardSidebar(
width = 280,
sidebarMenu(
menuItem(text = "Output", tabName = "Out1", icon = icon("file-upload"))
)
),
dashboardBody(
tabItems(
tabItem(
tabName = "Out1",
fluidRow(column(width = 10, strong("Data")), align = "center"),
br(),
fluidRow(rpivotTableOutput("Data1"))
)
)
)
)
server <-
function(input, output){
library(rpivotTable)
output$Data1 <-
renderRpivotTable(
rpivotTable(
data = mtcars
, rows = "cyl"
, cols = "gear"
, height = "780px"
)
)
}
runApp(
list(ui = ui, server = server)
, launch.browser = TRUE
)