ggmap geom_point问题

时间:2017-04-13 04:09:10

标签: r ggmap

我正在制作一个Shiny应用程序,但我的问题在于制作地图。

我用

读取数据
tabaco <-read.csv("TabacoUse.csv", header = TRUE, stringsAsFactors = FALSE)

使用小部件选择,我会过滤它。因此,例如,如果用户选择了阿拉巴马州和吸烟者类别“当前吸烟者”,那么数据将过滤到此

structure(list(Year = c(2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 
2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 
2010L, 2010L, 2010L, 2009L, 2009L, 2009L, 2009L, 2009L, 2009L, 
2009L, 2009L, 2009L, 2009L, 2009L, 2009L, 2009L, 2009L, 2009L, 
2009L, 2009L, 2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 
2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 
2008L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 
2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 2007L, 
2007L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 
2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 2006L, 
2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 
2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2005L, 2004L, 
2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 
2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 2004L, 2003L, 2003L, 
2003L, 2003L, 2003L, 2003L, 2003L, 2003L, 2003L, 2003L, 2003L, 
2003L, 2003L, 2003L, 2003L, 2003L, 2003L, 2002L, 2002L, 2002L, 
2002L, 2002L, 2002L, 2002L, 2002L, 2002L, 2002L, 2002L, 2002L, 
2002L, 2002L, 2002L, 2002L, 2002L, 2001L, 2001L, 2001L, 2001L, 
2001L, 2001L, 2001L, 2001L, 2001L, 2001L, 2001L, 2001L, 2001L, 
2001L, 2001L, 2001L, 2001L, 2000L, 2000L, 2000L, 2000L, 2000L, 
2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 
2000L, 2000L, 1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 
1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 1999L, 
1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 
1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1998L, 1997L, 
1997L, 1997L, 1997L, 1997L, 1997L, 1997L, 1997L, 1997L, 1997L, 
1997L, 1997L, 1997L, 1997L, 1997L, 1997L, 1996L, 1996L, 1996L, 
1996L, 1996L, 1996L, 1996L, 1996L, 1996L, 1996L, 1996L, 1996L, 
1996L, 1996L, 1996L, 1996L, 1996L), State = c("Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", 
"Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama"
), Gender = c("Female", "Female", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Male", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Female", "Overall", 
"Overall", "Overall", "Female", "Overall", "Overall", "Male", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Female", "Overall", 
"Overall", "Female", "Overall", "Overall", "Overall", "Overall", 
"Male", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Female", "Overall", "Overall", 
"Overall", "Female", "Overall", "Overall", "Overall", "Male", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Female", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Male", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Female", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Male", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Female", "Female", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Male", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Female", "Overall", "Female", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Female", "Overall", "Overall", "Overall", "Female", 
"Overall", "Overall", "Overall", "Overall", "Male", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Female", 
"Overall", "Female", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Male", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Female", 
"Overall", "Male", "Overall", "Overall", "Overall", "Overall", 
"Female", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Male", "Female", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Female", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Female", "Male", "Overall", "Overall", 
"Overall", "Overall", "Female", "Overall", "Overall", "Overall", 
"Overall", "Female", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Female", "Overall", "Overall", "Overall", "Overall", 
"Male", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Male", "Overall", 
"Overall", "Overall", "Overall", "Female", "Female", "Overall", 
"Overall", "Overall", "Overall", "Overall", "Overall", "Overall", 
"Overall", "Overall", "Overall", "Female", "Overall", "Male", 
"Overall", "Overall", "Overall", "Female", "Overall", "Overall", 
"Overall", "Overall", "Overall"), Type.of.Smoker = c("Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking", "Current Smoking", "Current Smoking", "Current Smoking", 
"Current Smoking"), Data_Value = c(18.7, 18.6, 21.5, 21.8, 10.3, 
21.9, 22.8, 24.3, 25.5, 25.8, 26.4, 27.9, 36.7, 38.1, 38.2, 16.5, 
16.4, 16.7, 10.5, 17.6, 18, 19.7, 20.6, 22.5, 22.6, 23.1, 24.4, 
25, 25.7, 26.5, 26.6, 26.9, 33.7, 36.5, 40.6, 7.8, 14.8, 16.9, 
17, 19.3, 21, 22.1, 22.3, 22.6, 23, 23.3, 24.7, 25.2, 26.1, 29.1, 
35.3, 38.1, 16.5, 34.3, 17.1, 17.4, 19.6, 21.2, 22.5, 22.8, 23.2, 
24, 24.7, 25.1, 25.7, 27.3, 28.9, 29, 32.8, 8.9, 9.7, 19.2, 17.6, 
19.8, 23.4, 24.7, 24.9, 25, 25.2, 25.9, 26.1, 27.2, 33.2, 37.9, 
34.9, 23.2, 20.5, 26.2, 9.6, 37.4, 35.7, 31.9, 31.5, 29.6, 28.1, 
27.4, 26.6, 26, 24.8, 24.4, 20.4, 19.9, 18.8, 18.7, 22.5, 34.6, 
38.5, 29.1, 28.9, 28.1, 26.9, 26.7, 26.3, 25.5, 24.9, 23.8, 21.9, 
21.2, 19.5, 19.4, 12.1, 29.4, 21.4, 11.4, 21.2, 21.4, 22.5, 24.3, 
25.3, 25.4, 25.6, 26.9, 27.3, 28, 28.4, 28.5, 33.3, 36.1, 31.7, 
12, 17.9, 18.9, 21.5, 21.5, 23.7, 24, 24.3, 24.4, 25.5, 26.2, 
27.5, 27.5, 31.6, 32.3, 35.5, 9, 31.9, 31.8, 29.7, 28.8, 27.9, 
27.7, 25.8, 25.1, 24.6, 23.8, 23.2, 22.1, 19.7, 18.7, 18.5, 31, 
33.9, 33.4, 32.3, 30.5, 28.9, 27.1, 25.5, 25.2, 24.8, 24.5, 24, 
22, 22, 20.2, 19.3, 11.1, 24.7, 33.9, 31.6, 29.2, 28.5, 27.2, 
26.2, 25.4, 24.6, 23.5, 21.6, 21.1, 18, 16.9, 16.8, 11.9, 24.9, 
12.8, 14.9, 18.3, 19.1, 20.3, 22.3, 24.6, 24.7, 25.5, 26.2, 27.2, 
27.9, 28, 29.5, 31.6, 33.2, 24.6, 36.1, 35.7, 30.9, 28.6, 27.2, 
26.1, 25.8, 25.3, 24.7, 21.2, 20.4, 20, 19.9, 16.4, 13.9, 24.5, 
30.3, 29.2, 29, 25.7, 24.9, 24.7, 24.3, 22.9, 22.4, 21.8, 20.7, 
20.2, 18.2, 17.5, 12.7, 24.5), Sample_Size = c(5234L, 1197L, 
5349L, 104L, 2733L, 7624L, 1856L, 3097L, 2390L, 2528L, 2475L, 
1521L, 1143L, 1165L, 62L, 3792L, 211L, 3718L, 2196L, 3305L, 3390L, 
4661L, 1801L, 6756L, 4638L, 1163L, 2791L, 218L, 2095L, 2279L, 
2231L, 1491L, 925L, 951L, 105L, 1959L, 72L, 3339L, 3264L, 4387L, 
1732L, 6471L, 1185L, 2001L, 4432L, 1528L, 2052L, 2084L, 2740L, 
204L, 953L, 972L, 108L, 1180L, 3515L, 3426L, 4895L, 1966L, 7219L, 
4879L, 1410L, 2312L, 3024L, 1802L, 2324L, 2382L, 70L, 257L, 1154L, 
2081L, 853L, 1638L, 676L, 1678L, 668L, 1039L, 2425L, 108L, 1004L, 
1380L, 1126L, 912L, 498L, 508L, 59L, 3278L, 2152L, 2325L, 802L, 
495L, 483L, 79L, 148L, 1062L, 953L, 1017L, 1264L, 979L, 3192L, 
740L, 2130L, 1620L, 682L, 1553L, 869L, 542L, 563L, 228L, 1226L, 
1153L, 1195L, 1141L, 1348L, 2507L, 3587L, 905L, 87L, 2361L, 1758L, 
1655L, 844L, 231L, 56L, 742L, 1624L, 1728L, 2151L, 733L, 3336L, 
2395L, 824L, 989L, 1041L, 1242L, 1093L, 1185L, 459L, 483L, 85L, 
687L, 1403L, 1504L, 2052L, 654L, 847L, 2226L, 1095L, 3088L, 962L, 
1072L, 1036L, 1021L, 488L, 497L, 219L, 542L, 52L, 456L, 433L, 
927L, 791L, 859L, 1048L, 253L, 1997L, 2789L, 922L, 1741L, 602L, 
1215L, 1322L, 1048L, 378L, 363L, 200L, 839L, 836L, 645L, 1634L, 
2234L, 680L, 731L, 750L, 1060L, 1398L, 974L, 498L, 431L, 603L, 
421L, 403L, 209L, 753L, 547L, 852L, 1546L, 658L, 2088L, 685L, 
1236L, 961L, 860L, 456L, 429L, 650L, 498L, 75L, 996L, 910L, 508L, 
1460L, 2244L, 199L, 710L, 1597L, 784L, 750L, 704L, 829L, 419L, 
435L, 2169L, 417L, 406L, 826L, 810L, 1626L, 694L, 659L, 672L, 
641L, 1359L, 865L, 213L, 978L, 442L, 444L, 595L, 50L, 401L, 390L, 
933L, 719L, 660L, 781L, 1599L, 2137L, 202L, 1356L, 453L, 922L, 
1023L, 400L, 612L), Lat = c(32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112, 32.84057112, 32.84057112, 32.84057112, 32.84057112, 
32.84057112), Lon = c(-86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076, -86.63186076, -86.63186076, -86.63186076, -86.63186076, 
-86.63186076)), class = "data.frame", row.names = c(NA, -254L
), .Names = c("Year", "State", "Gender", "Type.of.Smoker", "Data_Value", 
"Sample_Size", "Lat", "Lon"))

我在名为tabacouni的数据框中有这个。 R Studio告诉我它是对8个变量的254个观测值。

然后我尝试

estado<-qmap("Alabama", zoom=7)
show(estado + geom_point(data=tabacouni, aes(x=Lon, y=Lat,size=Sample_Size),color="red") + theme(legend.position="none"))

我得到两件事:

  • 阿拉巴马州没有积分的地图
  • 控制台中的警告“已删除包含缺失值的254行(geom_point)”。

我显然错过了一些东西,但我看不清楚......

0 个答案:

没有答案