oswaldosantos / ggsn

R package to add north symbols and scale bars to maps created with ggplot or ggmap
http://oswaldosantos.github.io/ggsn/
GNU General Public License v2.0
161 stars 9 forks source link

Error in FUN(left, right) : non-numeric argument to binary operator #6

Closed wraymond closed 8 years ago

wraymond commented 8 years ago

First off, I am super excited about this package! Thanks for all the work. I have been trying to get a scalebar on my own map and kept on getting various errors. So I ran through your example and got this Error in FUN(left, right) : non-numeric argument to binary operator After running ggm1 + blank() + north(map.df) + scalebar(map.df, dist = 5, dd2km = TRUE, model = 'WGS84')

from your example. the creation of ggm1 worked just fine. This is the same error I get when I try to add a scalebar to my own map. Thoughts? Thanls

oswaldosantos commented 8 years ago

Hi You got that error running the example without modifications or only trying to run your code following the example?

wraymond commented 8 years ago

Error running the example code (copy and paste). It just so happens thats its the same error when I try my own code/map as well.

oswaldosantos commented 8 years ago

I have updated the examples to replace the ggplot2:::fortify function for broom:::tidy. Please try again to see if the error persist. I am having no problems reproducing the examples.

wraymond commented 8 years ago

The new example code works. Now I will see if I can implement it with my data. I'll keep you posted. Thanks!