It should be in the datasets package that is automatically loaded with R (at least my copy), try ?state and you should see the help for it and others.
-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 From: Alina Sheyman [mailto:alina...@gmail.com] Sent: Tuesday, February 17, 2009 11:02 AM To: Greg Snow Cc: r-help@r-project.org Subject: Re: [R] creating a map Thanks Greg, do you know where i can find the sate.center dataset that you mention? On Tue, Feb 17, 2009 at 12:28 PM, Greg Snow <greg.s...@imail.org<mailto:greg.s...@imail.org>> wrote: You need to give the symbols function the locations where you want the centers of the circles to be. Some datesets with map information also have centers of the states that you can use, for the USA, there is the state.center dataset that may work for you, or the maptools package function get.Pcent will compute a center for polygons (there are probably other similar functions in other packages). For adding circles to a map of the USA, you may want to look at the state.vbm data in the TeachingDemos package (works with maptools package), but you will need to computer the centers of the polygons, they don't match state.center or others. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org<mailto:greg.s...@imail.org> 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org> > [mailto:r-help-boun...@r-<mailto:r-help-boun...@r-> > project.org<http://project.org>] On Behalf Of Alina Sheyman > Sent: Tuesday, February 17, 2009 9:53 AM > To: r-help@r-project.org<mailto:r-help@r-project.org> > Subject: [R] creating a map > > I'm trying to create a fairly basic map using R. What i want to get is > the > map of the country with circles representing a count of students in > each > state. > What I've done so far is as following - > map("state") > > symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inch > es=F) > > this gives me the map of the country, but one that's not populated by > my > counts. > Does anyone know what I'm doing wrong? > > Also, if anyone can recommend a good reference for creating maps in R, > I'd > really appreciate that. > > thank you > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org<mailto:R-help@r-project.org> mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.