I am trying to generate the following table as a output in R shiny:
data <- matrix(c(67,543940,85),ncol = 1,byrow = T)
colnames(data) <- "France"
rownames(data) <- c("Population (m)", "Size (km)", "No. of cities")
summary <- as.table(data)
output$table <- renderTable(summary)
However the data is outputted in the following format:
| Var1 | Var2 | Freq |
|---|---|---|
| Population (m) | France | 67 |
| Size (km) | France | 543940 |
| No. of cities | France | 85 |
Instead I want it the table to be displayed as:
| France | |
|---|---|
| Population (m) | 67 |
| Size (km) | 543940 |
| No. of cities | 85 |
How would I do this in R shiny?

