Thanks.
The example with an spatial polygons DF in p. 159 of
http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf
works nicely.
Instead, fortify() refuses processing spatial poins or pixels DF
with an error:
Error: ggplot2 doesn't know how to deal with data of class
On 12/10/2013 09:38 AM, Agustin Lobo wrote:
Thanks.
The example with an spatial polygons DF in p. 159 of
http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf
works nicely.
Instead, fortify() refuses processing spatial poins or pixels DF
with an error:
Error: ggplot2 doesn't
Does anyone know why function fortify() (to be run before plotting the
object with qmap) accepts spatial polygons DF and not
spatial points DF or spatial pixels DF?
Thanks
Agus
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
On 12/09/2013 06:53 PM, Agustin Lobo wrote:
Does anyone know why function fortify() (to be run before plotting the
object with qmap) accepts spatial polygons DF and not
spatial points DF or spatial pixels DF?
Thanks
Have you asked the maintainer of ggmap? Or have you tried converting
Because that's how it works.
ggplot likes to have everything in as long a data frame as possible,
rather than a wide data frame. So to plot some polygons with
geom_polygon, for example, you have to create a data frame with one
row per point, and each polygon has a separate id variable (see
Not yet, I thought it made sense asking about it in this list first to
consider previous experiences (i.e., as described by Barry) and make
sure there were no
simple workarounds or details that I had overlooked.
I will do it now and CC to this list.
Agus
On Mon, Dec 9, 2013 at 7:11 PM, Edzer