Hi Ravi,
After performing 'gIntersects' try merging this result to your dataframe,
then select the TRUE values?
Jesse
cz_zip - gIntersects(camapzip_temp,camap_base, byid=TRUE)
camap_base@data-cbind(camap_base@data, czip)
camap2-camap_base[(camap_base@data[,/???/] %in% c(TRUE)),] # Insert your
Milan,
Try using the function 'cuts' instead of at=c().
Jesse
library(sp)
data(meuse)
coordinates(meuse)=~x+y
spplot(meuse, cadmium, do.log = TRUE,
key.space=list(x=0.2,y=0.9,corner=c(0,1)), cuts=c(1, 2, 3, 4, 10, 20),
# My
custom cuts
scales=list(draw=T))
-
Hi Laetitia,
Try turning your .ppp object into a spatial grid data frame, then convert it
to a raster. The 'extract' function should then work if your projections
are correct.
Jesse
your.ppp.object-as.SpatialGridDataFrame.im(your.ppp.object)
rast.ppp.object- raster(your.ppp.object) #Convert
James, it seems like your projections for 'town' and 'muni.sp' are different
with one being lat/long and the other being a UTM Zonal. Try setting them
the same and see if that solves your problem.
Jesse
-
Jesse D Berman, PhD
Yale
Hi All,
I want to perform ordinary kriging on a series of air pollution values, but
am getting the error
/ IL.Jul7.ok-krige(Arithmetic.Mean~1, IL.Jul7, model=ILvgm.jul7,
newdata=IL2.map)
[using ordinary kriging]
chfactor.c, line 131: singular matrix in function LDLfactor()
Error in
Hi Hein,
I'm not sure if this will help, but one thing to check is that your
prediction grid has covariate data for each of the 40,000 cells. If a large
number of cells have 'NA' as data values, then sometimes the prediction will
not work. Offhandedly, it strikes me that ycoord may be limited
Hi all,
I've loaded the new version of R 3.0.0 and it seems the package 'maptools'
is not available on the mirrors. It's not urgent, but I'm curious if anyone
knows when it might become available? Thanks.
Regards,
Jesse
--
View this message in context:
Hi All,
First time post, so please excuse any omissions/confusion. I am performing
a series of prediction models using gstat and discovered that prediction
variance of spatially dependent data with OLS models was larger than those
of kriging models. This is counter-intuitive to the assumption
Hi Erin,
I'm sure someone else will have a more elegant solution, but if you need a
quick fix try this (adapted from your posted code)
Jesse
tmp - map(state,Texas,fill=TRUE,plot=FALSE)
texas.boundary - map2SpatialPolygons(tmp, IDs=tmp$names,
proj4string=CRS(+proj=longlat +datum=WGS84