Re: [R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Samuel Turgeon
Hi Steven, You should check the projections of your datasets (summary()). When I do the same kind of analyses, I use: readOGR(), to read the shp proj4string(), to assign a projection overlay(), to make spatial overlay analysis spplot(), to plot more than one spatial layer hope this help Sam

Re: [R-sig-Geo] How to cite raster package ?

2012-10-19 Thread Samuel Turgeon
Hi, like any other library. citation(raster) On Fri, Oct 19, 2012 at 11:59 AM, Narayani Barve naray...@ku.edu wrote: Hi All, I have a genuine question. I want to cite raster package in my paper. But I could not find the citation details. Any help will be appreciated. Thanks, Narayani

[R-sig-Geo] predict.gam, question about resolution

2012-08-13 Thread Samuel Turgeon
Dear all, I'm using predict.gam (mgcv package) to predict count data (y) from line transect to a regular grid. My model have this form: y=offset(log(x1*0.6))+s(x2)+s(x3)+s(x4), family=quasipoisson,... the offset is the area covered by a portion of a transect line (length(x1)*observation

Re: [R-sig-Geo] Class range on bubble plot

2012-07-17 Thread Samuel Turgeon
Hi, you should check the distribution of meuse$zinc ( hist(), summary(),...) before choosing the class intervals. A maximum of 1 make no sense since the maximum of meuse$zinc is less than 2000. Try, for example: bubble(meuse[zinc], maxsize=3, key.entries = c(100,500,700,2000)) Hope this

Re: [R-sig-Geo] Putting Multiple spplots in the same page

2012-07-17 Thread Samuel Turgeon
Hi, you can also do: library(gstat) data(meuse) coordinates(meuse) - ~x+y p1=spplot ( meuse, zinc) p2=spplot(meuse,copper) p3=spplot(meuse,lead) p4=spplot(meuse,cadmium) print(p1, position = c(0,.5,.5,1),more=T) print(p2, position = c(.5,.5,1,1),more = T) print(p3, position =

Re: [R-sig-Geo] Adding Spatial Polygon Data Frame to spplot output

2012-07-16 Thread Samuel Turgeon
Hi Roosbeh, one way to that is: ## a=SpatialPointsDataFrame ## b= SpatialPolygonsDataFrame pts - list(sp.points,a[,column_to_map]) spplot(b[,column_to_map],sp.layout=list(pts)) in the first line you can add parameters cex, pch, col,... In the second line you can add parameters such as

Re: [R-sig-Geo] subset() for spatialPointsDataFrame

2012-03-06 Thread Samuel Turgeon
Hi Johannes, did you transform your SpatialPointsDataFrame to a regular data.frame? point.df=data.frame(point.spdf) subset(points.df, points.df[,value] 0 , select = c(1, 2)) coordinates(points.df) = ~X + Y ##You should keep those columns (X,Y) in the subset command in order to backtransform the

Re: [R-sig-Geo] trouble with writeOGR

2012-03-06 Thread Samuel Turgeon
Hi Erin, I don't know if you fix your problem yet but I had the same error yesterday and the problem is that ArcGIS do not accept the caracter . in a field name.. hope this helps Sam On Thu, Mar 1, 2012 at 9:38 PM, Hodgess, Erin hodge...@uhd.edu wrote: Hi R Sig Geo People: I'm having some

[R-sig-Geo] backtransform prediction variance in gstat?

2011-01-12 Thread Samuel Turgeon
Dear all, I using the function krige.cv (in gstat library) to compare different kriging methods (ordinary, external drift, universal, lognormal,...). To do that I'm using among other the mean square normalized error (mean(out$zscore^2)). I'm wondering if I can use this statistic to compare