Hello everybody,
I have a dataset that is presented like that :
I need to convert my value in percentage and then draw a geom bar with the bar full matching the percentage.
I began like this : But obviously it's not working, can someone please help??? Thank you very much all.
database <- dbGetQuery(con_im, "select * from blablablamydata")
database = data %>%
group_by(slice_name) %>%
mutate(count=n()) %>%
ungroup() %>%
spread(slice_name,fill=0) %>%
mutate(Row_sum = "_c2",
Percentage = "_c2"/Row_sum)
ui <- shinyUI(fluidPage(titlePanel("Application usage and versions downloaded"),
checkboxGroupInput("checkgroup","Checkbox group",
choices =list ("AppDownloadUsage",
"DeviceSplit",
"TVappUsage",
"LiveTVUsage")
selected = "AppDownloadUsage", inline = TRUE),
plotOutput(outputId = "database", width = "auto", height = "500px", click = NULL,
dblclick = NULL, hover = NULL, hoverDelay = NULL,
overDelayType = NULL, brush = NULL, clickId = NULL, hoverId = NULL,
inline = FALSE))
)
server <- function(input, output) {
graphe <- geom_bar(databse, aes(x
})
}
shinyApp(ui = ui, server = server)