[R-sig-Geo] "Paste" with poly titles

Sarah Goslee sarah.goslee at gmail.com
Sun Nov 15 21:27:49 CET 2015


I think we need more information, and ideally a reproducible example.
I'm getting exactly what I'd expect:

myLabel <- paste("1234", "ABCD", sep="\n")
library(sp)
data(meuse.riv)
meuse.sr <- SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)),"meuse.riv")))
plot(meuse.sr)
title(myLabel)

I don't think the problem lies in paste(), (which is not the same
thing as Paste), but in something else you are doing.

Sarah



On Sun, Nov 15, 2015 at 3:14 PM, Jim Burke <javajimburke at gmail.com> wrote:
> myLabel <- paste(PctShp$PCT, PctShp$Last_Name, sep = "\n", collapse = NULL)
>
> GIVEN
> PCT = "1234"
> Last_name = "Open Seat"
>
> EXPECTED BEHAVIOUR
> 1234
> Open Seat
>
> ACTUAL BEHAVIOUR Prints on maps like below.
> 1234
>
> Open Seat
>
>
> I suspect I do not know something important about "Paste"
>
> All criticism and comments appreciated,
> Jim Burke
>
>         [[alternative HTML version deleted]]
>

---
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-sig-Geo mailing list