Re: [R] Mapping of groups of countries

2022-01-02 Thread Jim Lemon
Hi George, Same to you. I fooled around with the plot a bit after I sent the email. Jim On Mon, Jan 3, 2022 at 8:36 AM george brida wrote: > > Thanks a lot Jim. I really appreciate your help. Happy new year 2022. > George > > On Wed, Dec 29, 2021 at 10:10 PM Jim Lemon wrote: >> >> Hi George, >>

Re: [R] Mapping of groups of countries

2022-01-02 Thread george brida
Thanks a lot Jim. I really appreciate your help. Happy new year 2022. George On Wed, Dec 29, 2021 at 10:10 PM Jim Lemon wrote: > Hi George, > This example is obviously a mess, but it shows the basic elements. The > labels may be placed manually using something like boxed.labels > (plotrix) with

Re: [R] Mapping of groups of countries

2021-12-29 Thread Jim Lemon
Hi George, This example is obviously a mess, but it shows the basic elements. The labels may be placed manually using something like boxed.labels (plotrix) with lines connecting the labels to the smaller countries. If you want the labels within the countries you will have to use a big graphics devi

[R] Mapping of groups of countries

2021-12-29 Thread george brida
Dear R users, I would like to map with R the following countries (with their names on the map) as follows: the first group in red composed by China, Bangladesh, Eypt, Indonesia, South Korea, Nigeria. The second group in blue composed by Brazil, Pakistan, Philippines, Vietnam. The third group in g

Re: [R] Mapping 2D to 3D

2020-09-21 Thread Abby Spurdle
Hi H, I probably owe you an apology. I was just reading the geom_contour documentation. It's difficult to follow. Base R functions, my functions, and pretty much everyone's functions, take a matrix as input. But as far as I can tell, geom_contour wants a data.frame with three {x, y and z} coordin

Re: [R] Mapping 2D to 3D

2020-09-20 Thread Abby Spurdle
> I was looking at this example which uses geom_contour(): > > ggvolcano = volcano %>% > reshape2::melt() %>% > ggplot() + > geom_tile(aes(x=Var1,y=Var2,fill=value)) + > geom_contour(aes(x=Var1,y=Var2,z=value),color="black") + > scale_x_continuous("X",expand = c(0,0)) + > scale_y_continuous("

Re: [R] Mapping 2D to 3D

2020-09-20 Thread H
On 09/19/2020 04:33 PM, Abby Spurdle wrote: >> Understood > I'd recommend you try to be more precise. > >> I just began looking at the volcano dataset which uses geom_contour. > The volcano dataset does *not* use geom_contour. > However, the help file for the volcano dataset, does use the > filled.

Re: [R] Mapping 2D to 3D

2020-09-19 Thread Abby Spurdle
> Understood I'd recommend you try to be more precise. > I just began looking at the volcano dataset which uses geom_contour. The volcano dataset does *not* use geom_contour. However, the help file for the volcano dataset, does use the filled.contour function, in its example. > I now realize th

Re: [R] Mapping 2D to 3D

2020-09-19 Thread H
On 09/19/2020 12:42 AM, Jeff Newmiller wrote: > When dealing with a 2-d density plot, the z variable is a predefined function > of your x and y data, it is not something you can specify. If you want to > specify z, then you need to use geom_contour. You appear to need to study the > theory of ke

Re: [R] Mapping 2D to 3D

2020-09-18 Thread Jeff Newmiller
When dealing with a 2-d density plot, the z variable is a predefined function of your x and y data, it is not something you can specify. If you want to specify z, then you need to use geom_contour. You appear to need to study the theory of kernel density estimates, which is off topic here. (Tech

Re: [R] Mapping 2D to 3D

2020-09-18 Thread H
On 09/18/2020 03:08 AM, Carlos Ortega wrote: > Hi, > > There are some further references in the own "RStudio Community" and in > StackOverflow: > > * https://community.rstudio.com/t/options-to-stat-density-2d/792/4 > * > https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggp

Re: [R] Mapping 2D to 3D

2020-09-18 Thread H
On 09/18/2020 02:26 AM, Jeff Newmiller wrote: > No, but fortunately you are off in the weeds. Density has an > internally-computed "z" coordinate... you should be looking at ?geom_contour. > > On September 17, 2020 7:17:33 PM PDT, H wrote: >> I am trying to understand how to map 2D to 3D using gg

Re: [R] Mapping 2D to 3D

2020-09-18 Thread Carlos Ortega
Hi, There are some further references in the own "RStudio Community" and in StackOverflow: - https://community.rstudio.com/t/options-to-stat-density-2d/792/4 - https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggplotstat-density2d Kind Regards, Carlos. On Fri, Sep

Re: [R] Mapping 2D to 3D

2020-09-17 Thread Jeff Newmiller
No, but fortunately you are off in the weeds. Density has an internally-computed "z" coordinate... you should be looking at ?geom_contour. On September 17, 2020 7:17:33 PM PDT, H wrote: >I am trying to understand how to map 2D to 3D using ggplot() and >eventually plot_gg(). I am, however, stuck

Re: [R] Mapping 2D to 3D

2020-09-17 Thread Abby Spurdle
> But there's no reason for the user to do that when using the plotting > function. I should amend the above. There's no reason for the user to do that (compute a third "variable" representing density), if using a high level plotting function, that's designed to compute the density for you. It i

Re: [R] Mapping 2D to 3D

2020-09-17 Thread Abby Spurdle
I'm not familiar with the gg graphics system. However, I am familiar with density estimation, and density visualization. There is *no* third variable, as such. But rather, density estimates, which in this context, would usually be a matrix. (And are computed inside the plotting or density estimati

[R] Mapping 2D to 3D

2020-09-17 Thread H
I am trying to understand how to map 2D to 3D using ggplot() and eventually plot_gg(). I am, however, stuck on understanding how to express the third variable to be mapped. This example: ggdiamonds = ggplot(diamonds, aes(x, depth)) + stat_density_2d(aes(fill = stat(nlevel)), geom = "polygon", n

Re: [R] Mapping Geographical Coordinate Data

2020-07-04 Thread Jeff Newmiller
And post a minimal reproducible example (perhaps using dput(head(dta))). On July 4, 2020 7:41:28 AM PDT, Bert Gunter wrote: >You should post on r-sig-geo, not here. You are much more likely to >find >the interest and expertise you seek there. > >Bert Gunter > >"The trouble with having an open min

Re: [R] Mapping Geographical Coordinate Data

2020-07-04 Thread Bert Gunter
You should post on r-sig-geo, not here. You are much more likely to find the interest and expertise you seek there. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

[R] Mapping Geographical Coordinate Data

2020-07-04 Thread Graham Leask via R-help
Dear List, I have a postcode file containing geographical coordinates but this is not in the format of a standard shape file. I list the first 5 observations below; Postcode Postcode_geometry

Re: [R] Mapping of countries

2020-04-01 Thread george brida
Thanks a lot Jim.. Thank you Ani and Rasmus. Best On Wed, Apr 1, 2020 at 2:54 AM ani jaya wrote: > Maybe simply add: > > > points(station$Lon, station$Lat, col="red", pch=16, label="Your Country") > text(station$Lon, station$Lat,"Your Country", > col="black", pos=3, cex=1) > > station$Lon

Re: [R] Mapping of countries

2020-03-31 Thread ani jaya
Maybe simply add: points(station$Lon, station$Lat, col="red", pch=16, label="Your Country") text(station$Lon, station$Lat,"Your Country", col="black", pos=3, cex=1) station$Lon and Lat in your coordinate position. Regards, Ani On Tue, Mar 31, 2020 at 10:58 PM george brida wrote: > > Dea

Re: [R] Mapping of countries

2020-03-31 Thread David Winsemius
On 3/31/20 6:49 AM, george brida wrote: Dear Jim, Is it possible to add also a title to this map? Many thanks When I look at the  ?map help page, I see all these questions answered in the Examples section. -- David On Tue, Mar 31, 2020 at 2:29 PM george brida wrote: Dear Jim,

Re: [R] Mapping of countries

2020-03-31 Thread Rasmus Liland
On 2020-03-31 03:38 +0200, george brida wrote: > i would like to plot the maps of the Gulf Cooperation Council (GCC) > countries (KSA, Qatar, Bahrain, Kuwait, UAE and Oman) with these > constraints: i/ KSA , Qatar and Bahrain have the same face color , ii/ > Kuweit and UAE with the same face color

Re: [R] Mapping of countries

2020-03-31 Thread george brida
Dear Jim, Is it possible to add also a title to this map? Many thanks On Tue, Mar 31, 2020 at 2:29 PM george brida wrote: > Dear Jim, > > Thank you very much. I obtained now the required map. I would like to know > how to add the names of the countries. > > Best > George > > On Tue, Mar 31,

Re: [R] Mapping of countries

2020-03-31 Thread george brida
Dear Gunter, It is noted. Thanks Best On Tue, Mar 31, 2020 at 6:04 AM Bert Gunter wrote: > Probably better posted to the r-sig-geo list, where you are more > likely to find the relevant expertise. > > Perhaps see also https://cran.r-project.org/web/views/Spatial.html, > depending on what you p

Re: [R] Mapping of countries

2020-03-31 Thread george brida
Dear Jim, Thank you very much. I obtained now the required map. I would like to know how to add the names of the countries. Best George On Tue, Mar 31, 2020 at 10:10 AM Jim Lemon wrote: > Hi George, > Try this: > > library(maps) > map("world",xlim=c(34.353,60.369),ylim=c(16.7,32.193), > regio

Re: [R] Mapping of countries

2020-03-31 Thread Erin Hodgess
That would have been my code too! On Tue, Mar 31, 2020 at 2:10 AM Jim Lemon wrote: > Hi George, > Try this: > > library(maps) > map("world",xlim=c(34.353,60.369),ylim=c(16.7,32.193), > regions="Saudi Arabia",col="yellow",fill=TRUE) > map("world",regions="Bahrain",col="yellow",fill=TRUE,add=TRU

Re: [R] Mapping of countries

2020-03-31 Thread george brida
Hi Erin, Thanks for the reply. I would like to have just those countries on the map. Best George On Tue, Mar 31, 2020 at 5:02 AM Erin Hodgess wrote: > Hello George! > > Do you mean to have a map of the world with these countries filled in, or > to have just those countries on the map, please?

Re: [R] Mapping of countries

2020-03-31 Thread Jim Lemon
Hi George, Try this: library(maps) map("world",xlim=c(34.353,60.369),ylim=c(16.7,32.193), regions="Saudi Arabia",col="yellow",fill=TRUE) map("world",regions="Bahrain",col="yellow",fill=TRUE,add=TRUE) map("world",regions="Kuwait",col="lightblue",fill=TRUE,add=TRUE) map("world",regions="Qatar",col=

Re: [R] Mapping of countries

2020-03-30 Thread Bert Gunter
Probably better posted to the r-sig-geo list, where you are more likely to find the relevant expertise. Perhaps see also https://cran.r-project.org/web/views/Spatial.html, depending on what you plan to do with your maps. Bert Gunter "The trouble with having an open mind is that people keep comin

Re: [R] Mapping of countries

2020-03-30 Thread Erin Hodgess
Hello George! Do you mean to have a map of the world with these countries filled in, or to have just those countries on the map, please? Thanks, Erin Erin Hodgess, PhD mailto: erinm.hodg...@gmail.com On Mon, Mar 30, 2020 at 7:38 PM george brida wrote: > Dear R users, > > i would like to plot

[R] Mapping of countries

2020-03-30 Thread george brida
Dear R users, i would like to plot the maps of the Gulf Cooperation Council (GCC) countries (KSA, Qatar, Bahrain, Kuwait, UAE and Oman) with these constraints: i/ KSA , Qatar and Bahrain have the same face color , ii/ Kuweit and UAE with the same face color and iii/Oman with another face color. I

Re: [R] mapping groups of states without interior borders

2018-05-21 Thread Bert Gunter
Presumably this is in the package maps?? -- you need to specify such details when referring to non-base R functionality. In any case, you are more likely to get a helpful response if you post to the r-sig-geo list, which specialized in such spatial statistics/graphics questions. Cheers, Bert

[R] mapping groups of states without interior borders

2018-05-21 Thread Simon, Heather
I have been using the "map" function in R and I was wondering if there is a way to map multi-state regions just showing the outline of the region without interior state borders. For instance, I am calculating aggregated statistics using 10 multi-state regions. I would like to color-code indivi

Re: [R] mapping between list and vector

2015-10-29 Thread Adams, Jean
Maxim, I'm not sure how much faster this would be ... but you could test it out and see. I defined lngL and result as vectors instead of lists. And I calculated j outside of the "loop". myList <- list(a="key1", b=c("key2","key3"), c="key4") myVec <- c("val1","val2","val3","val4") lngL <- sappl

[R] mapping between list and vector

2015-10-29 Thread Maxim via R-help
Hi, for some reason I have to map elements of a list "myList" (of vectors of different length) to a vector "myVec" as such: myList <- list(a="key1", b=c("key2","key3"), c="key4") myVec <- c("val1","val2","val3","val4") result <- list() lapply(myList,length) -> lngL j <- 1 for (i in 1:(length(l

Re: [R] Mapping code not working

2014-11-19 Thread Jeff Newmiller
Your error references a column that is not mentioned in your sample line of code. . suggesting that something else is going on. The usual advice applies, as the footer always says: >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, sel

[R] Mapping code not working

2014-11-19 Thread Chris Montgomery
I have a data frame of data I want to map. I've already created a base map called 'England'. The data frame is as follows: 'data.frame': 2303 obs. of 13 variables: $ Response.ID: int 1 2 3 4 5 6 7 8 9 10 ... $ Year : int 2013 2013 2013 2013 2013 2013 2013 2013 2013 2013 ... $ Sex

Re: [R] Mapping from one vector to another

2014-07-17 Thread Gang Chen
Jeff, Even though the solutions from the previous responders are good enough for my current situation, the principle you just raised will be definitely beneficial to your future work. Thanks a lot for sharing the insights! Gang On Thu, Jul 17, 2014 at 12:06 PM, Jeff Newmiller wrote: > You ask a

Re: [R] Mapping from one vector to another

2014-07-17 Thread Jeff Newmiller
You ask about generic methods for introducing alternate values for factors, and some of the other responses address this quite efficiently. However, a factor has meaning only within one vector at a time, since another vector may have additional values or missing values relative to the first vect

Re: [R] Mapping from one vector to another

2014-07-17 Thread Gang Chen
Thanks a lot for the quick and elegant solutions, Sarah, Bill and Petr! I really appreciate it, including the suggestion of setting a random seed. Have a nice day! Gang On Thu, Jul 17, 2014 at 11:15 AM, Sarah Goslee wrote: > What about: > > d$var <- c(8, 11, 3, 2)[d$fac] > > Side note: it's much

Re: [R] Mapping from one vector to another

2014-07-17 Thread PIKAL Petr
[mailto:r-help-bounces@r- > project.org] On Behalf Of Gang Chen > Sent: Thursday, July 17, 2014 5:00 PM > To: r-help > Subject: [R] Mapping from one vector to another > > Suppose I have the following dataframe: > > L4 <- LETTERS[1:4] > fac <- sample(L4, 10, replace = T

Re: [R] Mapping from one vector to another

2014-07-17 Thread Sarah Goslee
What about: d$var <- c(8, 11, 3, 2)[d$fac] Side note: it's much appreciated that you included data and a clear problem statement. If you use set.seed(123) before your call to sample(), everyone who tries it will get the same fac that you do. Otherwise we all get something different. Or just gener

Re: [R] Mapping from one vector to another

2014-07-17 Thread William Dunlap
One way is to use a vector with names to do the mapping: > mapVector <- c(A=8, B=11, C=3, D=2) > mapVector[as.character(d$fac)] B B D A C D C B B B 11 11 2 8 3 2 3 11 11 11 > # you may want to wrap this with unname() > d$mappedFac <- mapVector[as.character(d$fac)] > d x y fac map

[R] Mapping from one vector to another

2014-07-17 Thread Gang Chen
Suppose I have the following dataframe: L4 <- LETTERS[1:4] fac <- sample(L4, 10, replace = TRUE) (d <- data.frame(x = 1, y = 1:10, fac = fac)) x y fac 1 1 1 B 2 1 2 B 3 1 3 D 4 1 4 A 5 1 5 C 6 1 6 D 7 1 7 C 8 1 8 B 9 1 9 B 10 1 10 B I'd like to add an

Re: [R] Mapping

2014-06-06 Thread David Winsemius
On Jun 6, 2014, at 3:15 AM, Roger Bivand wrote: > Tom Detzel propublica.org> writes: > >> >> Hey Folks, >> >> Apologies in advance if this has been covered. >> >> I'm taking on a simple mapping project. What packages, tutorials and >> examples would you recommend for a >> beginning mapper in

Re: [R] Mapping

2014-06-06 Thread Roger Bivand
Tom Detzel propublica.org> writes: > > Hey Folks, > > Apologies in advance if this has been covered. > > I'm taking on a simple mapping project. What packages, tutorials and > examples would you recommend for a > beginning mapper in R? The general advice is to look for CRAN Task Views, and in

Re: [R] Mapping

2014-06-05 Thread Greg Snow
What type of mapping? Do you want to add points to an existing map? Color in polygons of a downloaded map? Create a completely new map? other? our advice to you depends on what you want to do. Also please read the posting guide linked to at the bottom of all emails and don't post in HTML, this

[R] Mapping

2014-06-05 Thread Tom Detzel
Hey Folks, Apologies in advance if this has been covered. I'm taking on a simple mapping project. What packages, tutorials and examples would you recommend for a beginning mapper in R? Thanks, Tom [[alternative HTML version deleted]] __

Re: [R] Mapping two data files

2014-02-20 Thread farnoosh sheikhi
Thank you so much Arun:)   On Wednesday, February 19, 2014 6:06 PM, arun wrote: Hi Farnoosh, Try: library(plyr) res <- join(`DATA-A`,`DATA-B`,by="Var1",type="right")[,c(3,1:2,4)]  head(res) #  ID   Var1   Var2 var3 #1  1 AETNA CARDINAL CARE TIER 2      10 #2  2 

Re: [R] Mapping two data files

2014-02-19 Thread arun
Hi Farnoosh, Try: library(plyr) res <- join(`DATA-A`,`DATA-B`,by="Var1",type="right")[,c(3,1:2,4)]  head(res) #  ID   Var1   Var2 var3 #1  1 AETNA CARDINAL CARE TIER 2      10 #2  2  AETNA EPO Group1  110 #3  3 BLUE CARD INTE Group1    2 #4  4  

Re: [R] mapping data to a geographic map of Europe

2013-11-02 Thread Markus Kainu
Dear Claudia, I have written a tutorial for this task here; http://www.markuskainu.fi/r-tutorial/eurostat/spatial.html It uses the shapefile provided by Gisco and plots data from Eurostat. Packages rgdal and maptools are used to process the data and SpatialPolygonDataFrame is fortified into data

Re: [R] mapping data to a geographic map of Europe

2013-11-01 Thread paladini
Hi Jean, nevertheless this page "R-bloggers" looks realy interesting so I'll work through the tutorial. Thanks again for recommanding this web-site. Best regards Claudia Zitat von "Adams, Jean" : Claudia, I have not worked through the example myself. Since you seem to be getting errors,

Re: [R] mapping data to a geographic map of Europe

2013-11-01 Thread paladini
Hi Jim, that works nice. Thanks again! Have a nice weekend, best regards Claudia Zitat von Jim Lemon : On 10/31/2013 03:04 AM, palad...@trustindata.de wrote: Hi Jim, thats the second time that you helped me in a short while so thanks a lot! But it seems to me quite laborious and error-pron

Re: [R] mapping data to a geographic map of Europe

2013-11-01 Thread paladini
Hi Jean, thanks again for your response. As I told you I did the downloads and double checked if I selected the right directory. But I noticed right now what happend: The command in the example is : eurMap <- readShapePoly(fn="NUTS_2010_60M_SH/Shape/data/NUTS_RG_60M_2010") But it should be :

Re: [R] mapping data to a geographic map of Europe

2013-11-01 Thread Bert Gunter
... but you may be interested in this: http://andywoodruff.com/blog/why-are-choropleth-mercator-maps-bad-because-we-said-so/ Cheers, Bert On Fri, Nov 1, 2013 at 12:18 PM, Adams, Jean wrote: > Claudia, > > I have not worked through the example myself. Since you seem to be getting > errors, perh

Re: [R] mapping data to a geographic map of Europe

2013-11-01 Thread Adams, Jean
Claudia, I have not worked through the example myself. Since you seem to be getting errors, perhaps a different example would help. Here are some more choropleth maps (although these use US states rather than European countries). http://blog.revolutionanalytics.com/2009/11/choropleth-challenge-

Re: [R] mapping data to a geographic map of Europe

2013-10-30 Thread Jim Lemon
On 10/31/2013 03:04 AM, palad...@trustindata.de wrote: Hi Jim, thats the second time that you helped me in a short while so thanks a lot! But it seems to me quite laborious and error-prone to first select all the relevant countries in this long list and then to create a color vector. But perhaps

Re: [R] mapping data to a geographic map of Europe

2013-10-30 Thread paladini
Hi Jim, thats the second time that you helped me in a short while so thanks a lot! But it seems to me quite laborious and error-prone to first select all the relevant countries in this long list and then to create a color vector. But perhaps I get it all wrong. For the color vector I fi

Re: [R] mapping data to a geographic map of Europe

2013-10-30 Thread Adams, Jean
Claudia, You should cc r-help on all correspondence so that others can follow the thread. In the second paragraph of the link I sent you http://www.r-bloggers.com/maps-in-r-choropleth-maps/ a link is provided for the NUTS data, "The polygons for drawing the administrative boundaries wer

Re: [R] mapping data to a geographic map of Europe

2013-10-29 Thread Jim Lemon
On 10/30/2013 04:02 AM, palad...@trustindata.de wrote: Hello, I would like to draw a map of Europe. Each country should be colored depending on how it scores in an index called GPIndex. Say a dark red for real bad countries a light red for those which are not so bad, light blue for the fairly goo

Re: [R] mapping data to a geographic map of Europe

2013-10-29 Thread Adams, Jean
Check out this link for some examples http://www.r-bloggers.com/maps-in-r-choropleth-maps/ Jean On Tue, Oct 29, 2013 at 12:02 PM, wrote: > Hello, > I would like to draw a map of Europe. Each country should be colored > depending on how it scores in an index called GPIndex. > Say a dark red

[R] mapping data to a geographic map of Europe

2013-10-29 Thread paladini
Hello, I would like to draw a map of Europe. Each country should be colored depending on how it scores in an index called GPIndex. Say a dark red for real bad countries a light red for those which are not so bad, light blue for the fairly good ones and so on up to the really good ones in a d

Re: [R] Mapping help

2013-08-27 Thread MacQueen, Don
I'd suggest that r-sig-geo is a better choice for quick help in this case. Depending on how your data is currently stored, and given your short time frame, you might do better using software such as Quantum GIS, if you can get it installed quickly enough. In R, if you can get your data into an ob

[R] Mapping help

2013-08-26 Thread Rhona Govender
Dear all, I have to make a last minute map...my thesis is due in a few days and our GIS lady fell ill, so my supervisor asked me to try in R., but I am a beginner. I've searched online, but have not found something at the global scale. I have a global dataset of dependent values (eg. rate of comm

Re: [R] Mapping GWR Results in R

2013-05-26 Thread Roger Bivand
Patrick Likongwe yahoo.co.uk> writes: > > Dear Team, > > Help me out here. I have managed to run a Geographically Weighted > Regression in R with all results coming up. The problem now comes in > mapping the parameter estimates and the t values that are significant in > the model. My data is li

[R] Mapping GWR Results in R

2013-05-25 Thread Patrick Likongwe
Dear Team, Help me out here. I have managed to run a Geographically Weighted Regression in R with all results coming up. The problem now comes in mapping the parameter estimates and the t values that are significant in the model. My data is like this: Stn Area X Y Easting Northing Distance Depth

[R] Mapping GWR Results in R

2013-05-25 Thread Patrick Likongwe
Dear Team, Help me out here. I have managed to run a Geographically Weighted Regression in R with all results coming up. The problem now comes in mapping the parameter estimates and the t values that are significant in the model. My data is like this: Stn Area X Y Easting Northing Distance Depth

Re: [R] Mapping

2012-10-19 Thread Duncan Murdoch
On 12-10-18 6:11 PM, dorothy borowy wrote: I am a new user of R and am crunching through the system. I have reached an impasse with mapping; I want to make a bubble map and lay it over a grid that is composed of a standard x,y axis. Within this, are 16 (4x4) gridded blocks, numbered 1-16.

[R] Mapping

2012-10-18 Thread dorothy borowy
I am a new user of R and am crunching through the system. I have reached an impasse with mapping; I want to make a bubble map and lay it over a grid that is composed of a standard x,y axis. Within this, are 16 (4x4) gridded blocks, numbered 1-16. And, within these individual hectares(1-16) i

Re: [R] mapping data from table to .csv template

2012-09-25 Thread Heramb Gadgil
gt; xtabs(~x$sender+x$receiver)) > > Regards > > Petr > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.org] On Behalf Of s.s.m. fauzi > > Sent: Tuesday, September 25, 2012 4:06 AM > > To

Re: [R] mapping data from table to .csv template

2012-09-25 Thread PIKAL Petr
ailto:r-help-bounces@r- > project.org] On Behalf Of s.s.m. fauzi > Sent: Tuesday, September 25, 2012 4:06 AM > To: r-help@r-project.org > Subject: [R] mapping data from table to .csv template > > I have a .csv table named mailing.csv as below. It consist a receiver, > subjec

Re: [R] Mapping one vector to another

2012-06-13 Thread Geoff Leyland
On 13/06/2012, at 12:35 AM, Rui Barradas wrote: > Hello, .. On 13/06/2012, at 12:36 AM, Jean V Adams wrote: > Geoff, .. Thanks Rui and Jean, merge appears to be what I was looking for, and much better than my workaround for loop. __ R-help@

Re: [R] Mapping one vector to another

2012-06-12 Thread Jean V Adams
Geoff, I'm not exactly sure what you're trying to do, but if you want to match up information in two data frames according to a common column in each (node in map and Bus in period), then the merge() function might do the trick for you. Look at the examples in ?merge Jean Geoff Leylan

Re: [R] Mapping one vector to another

2012-06-12 Thread Rui Barradas
Hello, Try, after the first instruction but before the second and third, merge(periods, map, by.x="Bus", by.y="node", all.x=TRUE) Also, it's better to use dput() to give data examples. To paste the output of this or similar in a post is the recomended way: dput(head(periods, 20)) # or 30,

[R] Mapping one vector to another

2012-06-11 Thread Geoff Leyland
Hi, I'm new here, I'd like to map a set of values in a data frame to another set of values in another frame (think a c++ map<>, a python dict or a hash lookup) Specifically, I have a data frame of information about trading periods in the NZ electricity market. For each period I have information

[R] mapping sequence data R

2012-06-08 Thread amuznetin
Hello, I am new to R appreciate all the help from the R experts in the forum I am doing a click tracking project , the click tracking tracks the click, mouse over events . I am tracking what are the follow up events before some one clicks on the main zone 4 from which we generate the revenue

[R] mapping bathymetries and species abundances

2011-11-02 Thread Elena Guijarro
Dear all, I am new to R and even newer to mapping with R. I have installed PBSMapping, maptools and maps, and I am struggling to produce a map of fish abundance in the Grand Banks. I have tried several approaches to plot the bathymetry in my study area: 1) download the data from http://topex

[R] Mapping strings to integers

2011-08-23 Thread Ali.Abbas
Dear All, I am quite a newbie to R. Trying to learn it these days. Sorry for asking such a basic question, but could you kindly tell me how to map unique string values to integers in a data frame? I have a graph which has, most of its, vertices' attributes in a string format. I would like to replac

Re: [R] Mapping the coordinates!

2010-10-11 Thread Paul Hiemstra
Hi Mehdi, Take a look at the spatial task view [1] and the r-sig-geo mailing [2] list. cheers, Paul [1] http://cran.r-project.org/web/views/Spatial.html [2] https://stat.ethz.ch/mailman/listinfo/r-sig-geo On 10/10/2010 06:11 AM, Mehdi Zarrei wrote:

Re: [R] Mapping the coordinates!

2010-10-09 Thread Johannes Huesing
Mehdi Zarrei [Sun, Oct 10, 2010 at 06:11:23AM CEST]: > > > > > > > > > > > Hello, > > > > I have a series of coordinates > (latitudes and longitudes) each one/several associated to a code > (from 1 to 28). I used function points (latitude, longitude

[R] Mapping the coordinates!

2010-10-09 Thread Mehdi Zarrei
Hello, I have a series of coordinates (latitudes and longitudes) each one/several associated to a code (from 1 to 28). I used function points (latitude, longitudes) to transfer them to a per-prepared map. 1- I wonder how I might be

Re: [R] mapping array

2010-09-12 Thread Gregory Ryslik
gt; ### 8< cut here 8< ### > > > (The sorting is not necessary. It's only there to make checking what > happened easier.) > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Grego

Re: [R] mapping array

2010-09-11 Thread Bill.Venables
er.) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gregory Ryslik Sent: Sunday, 12 September 2010 8:54 AM To: r-help@r-project.org Subject: [R] mapping array Hi, Suppose I have array A with 100 elements all filled in with &q

Re: [R] mapping array

2010-09-11 Thread Joshua Wiley
Hi Greg, I am sketchy on a few details of C, but does something like this work for you? I just created C1 (renamed because C() is a function) with two columns the first corresponding to A and the second to B. Then I just used the first column to select elements of A and the second to select elem

[R] mapping array

2010-09-11 Thread Gregory Ryslik
Hi, Suppose I have array A with 100 elements all filled in with "N/A". Array B has 25 elements with actual values. Lastly, I have array C that provides a map of where to put the elements from array A into array B. Thus C would say put element 1 from B into element 3 from array A. I realize

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
Thanks Jorge, That is what I was looking for. Cheers, James From: Jorge Ivan Velez [mailto:jorgeivanve...@gmail.com] Sent: 08 September 2009 18:41 To: Arnold, James Cc: r-help@r-project.org Subject: Re: [R] Mapping factors to a new set of factors Hi James, Take a look at the "r

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
not seem to be able to be seen within the scope of a function that sets that variable and calls recode. Thanks, James -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: 08 September 2009 22:25 To: Arnold, James Subject: Re: [R] Mapping factors to a new set

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
jholt...@gmail.com] Sent: 08 September 2009 18:37 To: Arnold, James Cc: r-help@r-project.org Subject: Re: [R] Mapping factors to a new set of factors use 'ifelse' # not tested; you supply data for the '%in%' map <- function(x){ ifelse(x %in% c('a','b'), &

Re: [R] Mapping factors to a new set of factors

2009-09-08 Thread Jorge Ivan Velez
Hi James, Take a look at the "recode" function in the "car" package. It might be useful in this case. HTH, Jorge On Tue, Sep 8, 2009 at 12:01 PM, wrote: > Hello, > > I am trying to map a factor variable within a data frame to a new variable > whose entries are derived from the content of the o

Re: [R] Mapping factors to a new set of factors

2009-09-08 Thread jim holtman
use 'ifelse' # not tested; you supply data for the '%in%' map <- function(x){ ifelse(x %in% c('a','b'), "North", ifelse(x %in% c('c','d'), "South", ifelse(x %in% c('e', 'f'), "East", ifelse(x %in% c('g', 'h'), "West", NA } On Tue, Sep 8, 2009 at 12:01 PM, wrot

[R] Mapping factors to a new set of factors

2009-09-08 Thread james.arnold
Hello, I am trying to map a factor variable within a data frame to a new variable whose entries are derived from the content of the original variable and there are fewer factors in the new variable. That is, I'm trying to set up a surjection. After first thinking that this would be a common op

Re: [R] mapping states with colors

2009-07-03 Thread Greg Snow
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Donald Braman > Sent: Thursday, July 02, 2009 7:12 PM > To: r-help > Subject: [R] mapping states with colors > > Hi folks, > I'm just learning how to use

Re: [R] mapping states with colors

2009-07-03 Thread Paul Hiemstra
Hi, You could have a look at the sp-package, it provides R-classes for spatial data. In addition, it also provides very nice plotting facilities. To read your data into these sp classes you can use the rgdal package. There is also an R mailing list specifically for geographic data (r-sig-geo)

[R] mapping states with colors

2009-07-02 Thread Donald Braman
Hi folks, I'm just learning how to use maps. As an initial foray, I'm mapping the states that have "duty to retreat" (blue) and "stand your ground" (red) self-defense standards. Here is my extremely naive script: dtr <- c('alabama', 'arizona', 'conneticut', 'delaware', 'dist of columbia' , 'hawa

Re: [R] Mapping in R

2009-03-31 Thread jgarcia
It is relatively easy to do a small function for this in R: a) select the desired width for your border b) through a fix number or through the use of pretty(), establish the number of rectangles you want along your border. Then e.g., you can use rect() you build the sequence of black-white rectangl

Re: [R] Mapping in R

2009-03-31 Thread Ben Bolker
Kelsey Scheitlin fsu.edu> writes: > > Hi, I am looking for a specific mapping capability in R that I can't seem to find, but think exists. I would > like to make a border of a map have alternating black and white squares instead of the common latitude and > longitude grid. (example: http://www.

[R] Mapping in R

2009-03-30 Thread Kelsey Scheitlin
Hi, I am looking for a specific mapping capability in R that I can't seem to find, but think exists. I would like to make a border of a map have alternating black and white squares instead of the common latitude and longitude grid. (example: http://www.cccturtle.org/sat_maps/map0bw8.gif). If an

Re: [R] mapping lat and long with maps package

2009-03-04 Thread David Winsemius
Well, you're the one who offered code without designating what libraries were loaded or required. Here's my sessionInfo, ... what's yours? > sessionInfo() R version 2.8.1 Patched (2009-01-07 r47515) i386-apple-darwin9.6.0 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached

  1   2   >