Я уточнил большой фрейм данных для использования в Shiny App, но я не могу понять, как заставить Shiny использовать фрейм данных, моя текущая попытка ниже, но это не удается, и он не может загрузить график. ожидаю.
contVariables <- c("percent_ctax_a_c" = "Percentage of population in council tax bands A - C",
"percent_ctax_d_e" = "Percentage of population in council tax bands D - E",
"percent_ctax_f_h" = "Percentage of population in council tax bands F - H",
"crimes_per_10000_popn" = "Crimes (per 10'000 population)",
"hosp_admissions_per_100000_popn" = "Hospital Admissions (per 100'000 population)",
"median_house_price_GBP" = "Median House Price (GBP)",
"mean_year_jobseekers_ages_25_49" = "Percentage of population aged 25-49 claiming Jobseekers Allowance",
"percent_waste_recycled" = "Percentage of waste recycled",
"waste_kg_per_capita" = "Waste per capita (kg)",
"percent_people_near_derelict" = "Percentage of people near derelict sites")
shinyServer(function(input, output) {
output$plot <- renderPlot( {
data("Final_Data.csv")
p <- ggplot(data=data) +
aes_string(x=input$x, y=input$y) +
aes_string(colour=input$Council)
p <- p + geom_point() +
xlab(contVariables[input$x]) +
ylab(contVariables[input$y])
p
} )
})