Is it possible to **Repeat all item labels** by RpivotTable library in R using JavaScript?

I’m getting pivot table output without repetition of column and rows labels using RpivotTable package in R (kindly run the codes to see the result in R). I need the output layout in Tablular form with repetition of labels (like the one attached as image). It can be done through Javascript in R. I have tried a lot but couldn’t get the desired results.

I need something like this

My code:

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)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.