Re: [R-sig-Geo] writeRaster and raster give same error after package update

2013-11-20 Thread Guillaume Drolet
Hi Robert, This morning I got the error below when I tried to install the latest version of raster: install.packages(raster, repos = http://R-Forge.project.org;) Installing package into ‘C:/Users/Utilisateur/Documents/R/win-library/3.0’ (as ‘lib’ is unspecified) source repository is

Re: [R-sig-Geo] Regression kriging - error not found when ordinary kriging

2013-11-20 Thread Ashton Shortridge
hi Jordan, (off-list) it sounds like your problem is not a good candidate for regression kriging. RK (or the similar kriging with external drift, KED) require that you have collocated dependent and independent variables so that you can actually run a regression. You could use cokriging,

[R-sig-Geo] cluster error with clusterR and calc

2013-11-20 Thread Guillaume Drolet
Hi,I have the piece of code below which returns this error: Error in clusterR(s, fun1, filename = f) : cluster error# Piece of code# x, y, z are rasters# f is a filenamefun1 - function(x) { calc(x, fun = function(x) {10 * (x[2] - x[3]) / ENV.LAPSERATE + x[1] })}s - stack(x, y,

Re: [R-sig-Geo] writeRaster and raster give same error after package update

2013-11-20 Thread Robert J. Hijmans
Guillaume. Alternatively you can download and then install from here: http://r-forge.r-project.org/R/?group_id=294 Download the zip file and in Rgui use install packages from local zip file Robert On Wed, Nov 20, 2013 at 6:32 AM, Guillaume Drolet droletguilla...@gmail.com wrote: Hi Robert,

Re: [R-sig-Geo] image background for spplot of gridded data

2013-11-20 Thread Oscar Perpiñan
Hi, For the sake of completeness: just a few days ago I received a comment to a post about spplot and ggmap (http://procomun.wordpress.com/2013/04/24/stamen-maps-with-spplot/). There I was using a SpatialPointsDataFrame object. Because of that comment I posted another example with

Re: [R-sig-Geo] cluster error with clusterR and calc

2013-11-20 Thread Guillaume Drolet
Hi Robert, Thanks for your help. I thought that overlay didn't work with clusterR (see ?clusterR: ... For example, it works with calc but not with overlay.) Is there any way to export variables to the clusters when using clusterR, similar to when using clusterExport() with snow, or if it HAS to

Re: [R-sig-Geo] cluster error with clusterR and calc

2013-11-20 Thread Robert J. Hijmans
Guillaume, You cannot use an unevaluated variable in the clusterR fun function as such variables are not exported to the nodes. It works by replacing ENV.LAPSERATE with a number. Also, note my different (matrix) notation in the function for calc, but that for cases like this, where you want to

Re: [R-sig-Geo] cluster error with clusterR and calc

2013-11-20 Thread Robert J. Hijmans
The manual is wrong. It should say that clusterR also works with overlay if you use a single RasterStack or RasterBrick object as the first argument (it would not work if you provided three RasterLayer objects) Yes, you can use clusterExport, by first calling getCluster() to get the cluster

[R-sig-Geo] Clipping a Map

2013-11-20 Thread Ravi --
Hi, I have a larger map that I want to clip using a another map. I found this code on geo mailing list and it works and clips the map properly by the data layer is lost. The code is below. { cz_zip - gIntersects(camapzip_temp,camap_base, byid=TRUE) out - lapply( which(cz_zip) , function(x){

[R-sig-Geo] Spatial Prediction

2013-11-20 Thread BINGJIE HUANG
Hi all, I'm doing a project for my course, and I got stuck understanding the requirements of the project. The project ask me to use 4 ways to do the spatial prediction: regression-based predictors (no spatial component), ordinary kriging (no regression component), universal kriging (regression