Re: [R] Adding Two-Headed Arrow in map legend

2016-04-14 Thread Miluji Sb
Hello Jim, You're amazing. This is what finally worked: arrows(-1,19,35.6,19,code=3, xpd=T). Don't know the coordinates were giving so much trouble. Maybe something to do with maps in rworldmap. Thanks again! Sincerely, Milu On Wed, Apr 13, 2016 at 6:51 AM, Jim Lemon wrote: > Hi Milu, > My

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-12 Thread Jim Lemon
Hi Milu, My fault here. As I don't have the data to make the map and try out my suggestions I mixed up the x and y coordinates. Try this: par(xpd=TRUE) arrows(-19.75966,53,33.6,53,code=3) par(xpd=FALSE) Jim On Tue, Apr 12, 2016 at 10:11 PM, Miluji Sb wrote: > Hello Jim, > > Thanks again. I

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-12 Thread Jim Lemon
Hi Milu, There is a two-headed arrow on the image you sent, and it seems to be where you specified. Did you want it beneath the map, as: par(xpd=TRUE) arrows(-22,54.75,-22,74,code=3) par(xpd=FALSE) Jim On Tue, Apr 12, 2016 at 7:58 PM, Miluji Sb wrote: > Dear Jim, > > Thanks again! I do want the

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-11 Thread Jim Lemon
Hi Milu, I just realized that by "the bottom of the map" you may mean "beneath the map", in which case you should use: par(xpd=TRUE) arrows(...) par(xpd=FALSE) Jim On Mon, Apr 11, 2016 at 11:50 PM, Miluji Sb wrote: > Dear David, > > Thank you very much for your replies! I didn't know about par(

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-11 Thread Miluji Sb
Dear David, Thank you very much for your replies! I didn't know about par('usr'). I get different coordinates though: [1] -19.75966 54.75966 33.6 71.4 But the arrow is not at the bottom of the map. I will keep playing with this. Thanks again! Sincerely, Milu On Mon, Apr 11, 2016 a

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-10 Thread David Winsemius
> On Apr 10, 2016, at 1:45 PM, Miluji Sb wrote: > > Dear David, > > The device was the issue. The quartz() device works fine but pdf() does not. > Now I just need to figure out the limits for map for Europe. Thanks for all > your help and patience. After plotting a map of Europe with base

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-10 Thread Miluji Sb
Dear David, The device was the issue. The quartz() device works fine but pdf() does not. Now I just need to figure out the limits for map for Europe. Thanks for all your help and patience. Sincerely, Milu On Sun, Apr 10, 2016 at 7:10 PM, David Winsemius wrote: > > > On Apr 10, 2016, at 4:12 A

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-10 Thread David Winsemius
> On Apr 10, 2016, at 4:12 AM, Miluji Sb wrote: > > Hello David, > > This is exactly what I want but I still can't get the arrows. R and R studio > is updated. Thanks again! I didn't try it in Rstudio until just now (and I don't remember that you ever mentioned RStudio as a possible issue.)

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-10 Thread Miluji Sb
Hello David, This is exactly what I want but I still can't get the arrows. R and R studio is updated. Thanks again! Sincerely, Milu On Sat, Apr 9, 2016 at 10:29 PM, David Winsemius wrote: > > > On Apr 9, 2016, at 1:27 PM, David Winsemius > wrote: > > > > > >> On Apr 9, 2016, at 11:18 AM, Dav

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread David Winsemius
> On Apr 9, 2016, at 11:18 AM, David Winsemius wrote: > > >> On Apr 9, 2016, at 10:46 AM, Miluji Sb wrote: >> >> Dear David, >> >> Thank you for your answer. Sorry for the embarrassing mistake. However, even >> with when I generate a map for the whole world using: >> >> eps <- mapCountryDa

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread David Winsemius
> On Apr 9, 2016, at 10:46 AM, Miluji Sb wrote: > > Dear David, > > Thank you for your answer. Sorry for the embarrassing mistake. However, even > with when I generate a map for the whole world using: > > eps <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS > Score",colourPa

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread Miluji Sb
Dear David, Thank you for your answer. Sorry for the embarrassing mistake. However, even with when I generate a map for the whole world using: eps <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS Score",colourPalette=colourPalette, catMethod="fixedWidth", mi

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread David Winsemius
> On Apr 9, 2016, at 8:13 AM, Miluji Sb wrote: > > Forgot to copy the list > > Dear Jim, > > Thank you for your reply. I must be doing something wrong, If this is my > command to plot a map of Europe: > > eps_europe <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS > Score - Eu

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread Miluji Sb
Forgot to copy the list Dear Jim, Thank you for your reply. I must be doing something wrong, If this is my command to plot a map of Europe: eps_europe <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS Score - Europe",colourPalette=colourPalette, catMet

Re: [R] Adding Two-Headed Arrow in map legend

2016-04-09 Thread Jim Lemon
Hi Miluji, Try this: arrows(-100,-140,100,-140,code=3) Jim On Fri, Apr 8, 2016 at 10:24 PM, Miluji Sb wrote: > I am trying to draw maps for the world using: > > library(rworldmap) > library(maptools) > library(RColorBrewer) > > > tmp2<- dput(head(pece,10)) > structure(list(iso3 = c("AUS", "AUT

[R] Adding Two-Headed Arrow in map legend

2016-04-08 Thread Miluji Sb
I am trying to draw maps for the world using: library(rworldmap) library(maptools) library(RColorBrewer) tmp2<- dput(head(pece,10)) structure(list(iso3 = c("AUS", "AUT", "BEL", "CAN", "CHE", "CHL", "CZE", "DEU", "DNK", "ESP"), eps_score = c(0.877343773841858, 2.68984365463257, 1.31406247615814,