File size: 886 Bytes
fd3db9b ace8a2a 9e8caa8 f63879f 9e8caa8 ace8a2a fd3db9b 9e8caa8 ace8a2a 9e8caa8 ace8a2a fd3db9b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | library(shiny)
library(readxl)
library(rpivotTable)
ui <- fluidPage(
titlePanel("EDA no Browser – rpivotTable"),
mainPanel(
width = 12,
tabsetPanel(
tabPanel(
"Pivot Table",
rpivotTableOutput("pivot")
),
tabPanel(
"Informações",
h3("Sobre os Dados"),
p(strong("Arquivo:"), "STATUS1.xlsx"),
hr(),
verbatimTextOutput("info")
)
)
)
)
server <- function(input, output, session) {
STATUS <- reactive({
read_excel("STATUS1.xlsx")
})
output$pivot <- renderRpivotTable({
rpivotTable(STATUS())
})
output$info <- renderPrint({
dados <- STATUS()
cat("Dimensões:", nrow(dados), "linhas x", ncol(dados), "colunas\n\n")
cat("Colunas:\n")
print(names(dados))
cat("\n")
cat("Primeiras linhas:\n")
print(head(dados))
})
}
shinyApp(ui, server)
|