R code to extract shape polygons for any state for loading into Geobugs
NEVER, ever, post a question on a new topic in an existing thread - see the posting guide; you pollute the archive, and harm yourself by having your question "disappear". For conversion of SpatialPolygons* objects to read into WinBUGS, see ?sp2WB in the maptools package. Your question is more appropriate for the R-sig-geo list. Roger
Shant Ch wrote:
Hello R users, I am fitting a spatio-temporal model for the areal data related to school districts of Texas, US using geobugs. For that I need to load the polygon shape file in geobugs.In Bradley Carlin's website there was an S-plus program called poly.S to extract polygons for any state in the United States in the appropriate format for loading into GeoBUGS which is no more now and that too on S. Is there any R code to extract the polygons for all school districts of a state in the United States or something of that type, the format which can be used in geobugs? Bhargab
________________________________
To: r-help at r-project.org
Sent: Thu, July 7, 2011 4:40:19 PM
Subject: [R] subset from a dataset after comparing its one column to a
related
vector
Hello R users,
I have two data sets like the following. Form of dataset:
data:
X1 X2 X3 X4 X5
1902 RE 3 594 9
1903 RE 3 1340 7
1904 AA 3 760 14
1908 RE 4 1759 18
1909 EX 2 387 1
2901 AU 6 3116 2
3801 AA 1 304 29
3902 RE 5 2482 6
I need to select rows of a data set based on the common observations of
X1.
Using intersect command I got the common observations of X1 from the two
data
sets as:
common=c(1902, 1904, 1908, 1909, 3801).
Using subset command I can select portions separately. But in general if I
am
given this type of dataset - "data" with large number of rows and also a
list of
X1 - "common" containing many elements, can anyone please let me know how
to
select portion of the data whose X1 values are same as common values.
If any questions let me know.
Shant.
[[alternative HTML version deleted]]
______________________________________________
R-help at 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 at 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.
----- Roger Bivand Department of Economics NHH Norwegian School of Economics Helleveien 30 N-5045 Bergen, Norway -- View this message in context: http://r.789695.n4.nabble.com/subset-from-a-dataset-after-comparing-its-one-column-to-a-related-vector-tp3652576p3672186.html Sent from the R help mailing list archive at Nabble.com.