1
に、マップに緯度と経度の点を印刷する必要がありマップです。私はそれをやろうとしていましたが、私のオブジェクトを見つけることができないというエラーが表示されますd
。 プロット点(緯度・経度)私は光沢のあるアプリケーションとその一部を作成しようとしているggmap
私はちょうどマップを置く場合
はポイントなしで、良い作品が、それはステップです。マイserver.Rコードは次のとおりです。私が持っているui.Rで
#Reactive Map
output$MapPr <- renderPlot({
d <- switch(input$chDatabase,
"BPD 2013 Baltimore" = read.csv("./Data/BPD_13_Bal.csv",
header=TRUE, sep=",", dec="."),
"BPD 2014 Baltimore" = read.csv("./Data/BPD_14_Bal.csv",
header=TRUE, sep=",", dec=".")
)
library(ggmap)
map <- get_map(location = 'Baltimore', zoom = 12)
ggmap(map)
ggmap(map) +
geom_point(aes(as.numeric(d$Longitude), as.numeric(d$Latitude)), data = d, alpha =.5, color = "darkred")
}, width = 800, height = 700)
:
################################
#2nd tabpanel for Reactive Map
tabPanel("Reactive Map",
#SideBarLayout for sidebar Panel for the options of the map
sidebarLayout(
#SideBar Panel with options to adjust the map
sidebarPanel(
#Databases selection
selectInput("chDatabaseMap","Choose DataBase:",
choices = c("BPD 2013 Baltimore", "BPD 2014 Baltimore"))
),
###################################
#Main panel to put plots
mainPanel(
plotOutput("MapPr")
)
)
)
ちなみに、私はそれがの負荷の問題です見てきましたCSVファイル、または少なくとも私はそれを考えていますが、以前のプロット(ヒストグラム、パイ、ボックスプロットなど)は同じシステムで行っていました。
私は、この継続すべきかわかりません。
緯度と経度の列は両方とも数値です。
今、私は別のものを取得しています。警告:$のエラー: 'closure'タイプのオブジェクトはサブセット化できません – neoSmith
私の悪いです。今すぐ確認していただけますか? 'aes'の中で' $ 'を使うべきではない – Sumedh
うん!それは今動作します:Dロットの感謝の@Sumedh!私はまた、私のCSVファイルへの別のエラーについても気づいた。 – neoSmith