?Hello, I'm trying to get the distances between two Zipcode variables, but for some reason I get this error: "matching was not perfect, returning what was found.Error: no such index at level 1" Here is my code: library(ggmap)mapdist(data$Zip.A, data$Zip.B, mode = "driving") The Zip codes are all in 5 digits format.I really appreciate any help or suggestion.Thanks. [[alternative HTML version deleted]]
On Sep 17, 2015, at 3:36 PM, Farnoosh Sheikhi via R-help wrote:> Hello, > I'm trying to get the distances between two Zipcode variables, but for some reason I get this error: > "matching was not perfect, returning what was found.Error: no such index at level 1" > Here is my code: > > library(ggmap)mapdist(data$Zip.A, data$Zip.B, mode = "driving")Yes, for "some reason". But how should we be able to guess the reason when no data is available?> The Zip codes are all in 5 digits format.I really appreciate any help or suggestion.Thanks. > > [[alternative HTML version deleted]] >The reason you code is messy is that you posted in HTML to a plain-text mailing list.> ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
Farnoosh, Please add your data by doing a dput(sample(data)) and we'll be able to help you further. -- H On 17 September 2015 at 15:36, Farnoosh Sheikhi via R-help < r-help at r-project.org> wrote:> Hello, > I'm trying to get the distances between two Zipcode variables, but for > some reason I get this error: > "matching was not perfect, returning what was found.Error: no such index > at level 1" > Here is my code: > > library(ggmap)mapdist(data$Zip.A, data$Zip.B, mode = "driving") > The Zip codes are all in 5 digits format.I really appreciate any help or > suggestion.Thanks. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- OpenPGP: https://hasan.d8u.us/gpg.key Sent from my mobile device Envoy? de mon portable [[alternative HTML version deleted]]