Hi guys, I'm getting pivot table output without repetition of column and rows labels using RpivotTable package in R (kindly run my codes to see the result). I need the output layout in Tablular form with repetition of labels. I have also attached the image like which my output should be.
Is it possible to do so?
Regards
Also posted this question on stackoverflow:
https://stackoverflow.com/questions/53099473/is-it-possible-to-repeat-all-item-labels-in-tabular-form-layout-of-rpivott
library(rpivotTable)
library(dplyr)
library(readr)
library(shiny)
library(openxlsx)
#ui
ui = fluidPage(
fluidRow( rpivotTableOutput("pivot")))
#server
server = function(input, output) {
output$pivot <- renderRpivotTable(rpivotTable::rpivotTable(mtcars, rows = c(
"vs","gear" ),cols=c("am","cyl"),vals = "mpg", aggregatorName = "Sum",rendererName =
"Table",width="50%", height="550px"))}
shinyApp(ui = ui, server = server)