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,
>>
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
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
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
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
> 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("
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.
> 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
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
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
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
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
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
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
> 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
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
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
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
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 )
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
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
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
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,
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
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,
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
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
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
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?
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=
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
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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
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]]
__
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
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
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
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,
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
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 :
... 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
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-
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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@
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
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,
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
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
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
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
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:
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
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
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
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
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
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
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
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
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'), &
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
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
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
> -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
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)
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
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
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.
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
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 - 100 of 122 matches
Mail list logo