r - 如何从我的计算机上加载我的数据框?
问题描述
我已经改进了一个用于 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
} )
})
解决方案
推荐阅读
- javascript - 登录导航问题后反应导航
- python - CoolProp Python 中的 REFPROP 库
- angular - 合并来自两个 Angular 项目的 Karma 测试结果
- sql - 使用 SQL 将具有列名称的行转置为列
- java - 如何用google cloud dataflow和java依次生成gcs文件?
- reactjs - 承诺后如何使用react-router重定向到另一个url?
- php - PHP 性能包装 if 语句
- python - Python程序挂起,不知道为什么
- python - 使用 pydantic 生成动态模型
- aspose-cells - 获取 com.aspose.cells.CellsException:无效的 Excel2007Xlsx 文件格式