Displaying 20 results from an estimated 1000 matches similar to: "plot methods in sp"
2006 Jan 07
1
maptools, write.polylistShape
Dear Roger,
I am trying to use the write.polylistShape() function of maptools for
the first time and realize that it handles list of polygons of class
'polylist'. However, it seems that no as.polylist() function exist in
the package. The question behind that is: in your opinion, which would
be the best way to convert a list of matrix of polygon nodes
coordinates into an object of
2006 Oct 07
3
merge and polylist
Greetings:
I would like to kindly ask for a little help. The rough code is:
#________________________________________________________
dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t",
quote="\"", dec=".",na.strings = "NA"))
nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE)
mappolys=Map2poly(nc)
submap
2008 Feb 04
1
how to get points from SpatialPolygonsDataFrame
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080203/5ea1e3ad/attachment.pl
2013 Jan 04
1
SpatialPolygon with the max value gets no color assigned in spplot function when using "at" parameter
Hi,
I would like to do coloring of map regions based on the region values
"weight". The approach I am taking is first to break regions into equal
intervals,
classIntervals(spdf$weight,4)$brks #4 intervals in this case
and coloring all regions within the interval with the same color
col = brewer.pal(4,"RdYlGn"))
The max "weight" is as well the boundary of the
2009 Mar 21
3
Retrieving Vertices Coordinates from SpatialPolygons
Dear List,
I'm trying to use different R packages for my Teaching Assistantship
classes. And I cam out to an (apparently) very simple problem. I would
like to retrieve the vertices coordinate of a SpatialPolygon data. I
know this is stored in the "coords" slot, but I can't get access to
it! I tried to coerce the SpatialPolygon into a data.frame but it
doesn't work.
2008 Jul 08
2
attributing values to dataframe positions following eval
Hi everybody,
I've been looking around, but can't seem to find the answer.
I get a list of names (which vary, so I never know them in advance), and
transform them into variables, each of which is a dataframe, using
assign:
polyList <- c("rs123", "rs124", "rs555", "rs000")
numPoly <- length(polyList)
for (k in 1:numPoly) {
2006 Feb 23
0
adehabitat version 1.4
Dear all,
I have just uploaded to CRAN the version 1.4 of the
package 'adehabitat'. Significant changes are
listed below:
- The eigenanalysis of selection ratios (Calenge and Dufour, 2006, Ecology)
can now be performed using the function eisera(). It can be used for
the analysis of
habitat selection when habitat can be considered to consist of several
habitat types
(e.g.
2006 Feb 23
0
adehabitat version 1.4
Dear all,
I have just uploaded to CRAN the version 1.4 of the
package 'adehabitat'. Significant changes are
listed below:
- The eigenanalysis of selection ratios (Calenge and Dufour, 2006, Ecology)
can now be performed using the function eisera(). It can be used for
the analysis of
habitat selection when habitat can be considered to consist of several
habitat types
(e.g.
2008 Jun 29
2
How to get an argument dynamically from a list?
Hi,
I'd like to get an argument (I think it's the right term) dynamically from a list, but cannot manage to do it.
Here is the code I use:
#output given by database
BOB <- c('A/A', 'C/C', '15/27')
MARY <- c('A/A', NA, '13/12')
JOHN <- c('A/A', 'C/A', '154/35')
CLIFF <- c('A/C', 'C/C',
2007 Sep 17
1
map issues
Hi !
I have a shapefile that I can easily read into R using library(maptools). My problem stems from some warning messages that come even though everything seems to work fine.
library(maptools)
districts <- read.shape(filen = "a_ds", dbf.data = TRUE)
length(districts$Shapes)
so far so good. when I try and plot this I get a nice plot and a warning message:
> plot(districts)
2008 Jun 29
1
creating a dataframe using a list of the variable names
Hello,
I'm fairly new to R, and despite spending quite some time exploring, testing, and looking for answers, I still have a couple of questions remaining...
The first one is about creating a dataframe using a list of the variable names .
I get this output file from a database:
BOB <- c('A/A', 'C/C', '15/27')
MARY <- c('A/A', NA, '13/12')
JOHN
2007 May 04
1
Help with map
I have just learned how to play with map, but something weird
(or not) is happening.
Suppose I want to draw a map of two countries (that have disconnected
components), like Argentina and Brazil.
If I command:
library(maps)
library(mapdata)
map("worldHires", c("Argentina", "Brazil"))
It works fine. However, if I want to _colour_ the interior:
2008 Mar 29
3
Generating maps in R
Greetings!
I am trying plot some data on a map in R. Here's the scenario.
I have a variable called probworkinghealthy which contains a predicted
probability of employment for every individual in my sample (about
100,000 observations).
I have another variable, called a001ter, which contains the subject of
residency in the Russian Federation (akin to a US state) for every
individual in the
2009 Nov 23
1
OOP with Encapsulated Class Definitions
Hi all,
I'm seeking feedback (good, bad or indifferent) in regards to
developing (further) a new class system for R, that uses encapsulated
class definitions (i.e. the method definitions are literally inside
the body of the class definition).
A working (however very rough and poorly tested) system is available
in my R package "oosp" with documentation in the vignette
2006 Aug 04
2
RoR: recognizing a defined class
Hi all,
I am very new to Ruby and I have a silly question: how do I get RoR to
"recognize" that I just defined a class? To be more explicit, I have a
controller and view, and then I want to create a class and get the
controller to "see" it. So, I created a file called "myobject.rb" in the
models/ directory and inside it defined "class myobject [...] end".
2010 Jan 21
0
sp package - How to join two or more polygons from a SpatialPolygonsDataFrames
I have a SpatialPolygonsDataFrame object (sp package).
It contains 40 polygons.
Now I want to join some of the polygones.
I cannot figure out how to do that? Any ideas?
The code below produces a map of Germany and I need to join some
counties.
library(sp)
library(RColorBrewer)
# get spatial data for Germany on county level
con <- url("http://gadm.org/data/rda/DEU_adm3.RData")
2006 Dec 12
1
S4 'properties' - creating 'slot' functions?
Dear R users!
Several languages like C# or VB allow one to create properties; typically
these are under 'get', 'set' tags. My question is this really, what are
similar or comparable strategies in R, and what might be preferred? I have a
couple of situations where I want a certain computation to belong to a
class, but I do not really want to seperate it out to a stand-alone
2008 Jan 09
1
Subsetting Method [ Revisited
Hello Everyone:
As usual, thanks in advance for any help.
I was hoping to get some more advice on this question:
I'm trying to write a subsetting routine for an S3 object I've created --
lets call it myObject.
myObject has a few attributes basically of type string and numerics. Its
atomic value is just a vector of ints.
I want to write my own subsetting routine to subset myObject in
2008 Feb 17
1
random location in polygons sp spsample splancs csr
Dear all,
I had to place points at random, one in each of larger number of
polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see
sp library), and tried first to do it using spsample (from sp).
Surprisingly, every 5-15 trials, the output was a NULL value. The doc
says that ' this may occur when trying to hit a small and awkwardly
shaped polygon in a large
2003 Oct 22
2
Automatically updating GLM object
Dear all,
i generated several GLM objects, named myobject1 to myobject25.
Now i'd like to update both of them.
So i tried:
for(ii in 1:25) {
assign(paste("myobject.updated", ii, sep=""), update( myobject[ii]
,.~ + VAR2))
}
Doesn't work
I also tried to get all the names in a vector and
update(names.myobject[ii],.~ + VAR2)
Stiil doesn't work
Any ideas