[R-sig-Geo] Mahalanobis scores for training data

2013-12-11 Thread Gerardo Martin
Hi all. I have a series of distribution models with the mahalanobis distance implementation of dismo. I used the data.frame method because of the nature of data. However in order to run the proper diagnostic tests (not the traditional AUC) I need to calculate the distances of the training data.

Re: [R-sig-Geo] variogram model with gstat

2013-12-11 Thread Moshood Agba Bakare
Thanks for your response. I actually tried to run the script you gave and got 1. I applied the same concept to my data as variogram(yield~1, canmod.sp,cutoff=1e6)$gamma and it equally give 1. the reason for not having one is because of the the script I used as empvar<-variogram(yield~1,canmod.sp,

Re: [R-sig-Geo] variogram model with gstat

2013-12-11 Thread Edzer Pebesma
Try: library(sp) demo(meuse,ask=F) library(gstat) m = meuse$zinc meuse$m = (meuse$zinc - mean(meuse$zinc))/sd(meuse$zinc) var(meuse$m) # [1] 1 variogram(m~1, meuse, cutoff=1e6)$gamma # [1] 1 you see that the semivariogram averaged over ALL distances equals the variance of the variable. What you l

[R-sig-Geo] variogram model with gstat

2013-12-11 Thread Moshood Agba Bakare
Dear All, I used gstat package of R to fit variogram model to experimental variogram having normalized the raw data as VN = (VP -VMean)/VSd Where VN is the normalized yield value, VP is the original yield value at sampling point, VMean is average yield value, and VSd is the standard deviation of

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-11 Thread Etienne B. Racine
Good to know. Thanks ! Etienne 2013/12/11 Ahmadou Dicko > Until we find a solution to this problem, you can use writeGDAL > > writeGDAL(as(raster(matrix(1, 1, 1)), "SpatialGridDataFrame"), fname = > "test.tif") ## it works > > > > On Tue, Dec 10, 2013 at 7:24 PM, Etienne B. Racine wrote: > >>

Re: [R-sig-Geo] add image to plot

2013-12-11 Thread Ben Tupper
Hi, On Dec 11, 2013, at 8:58 AM, Roger Bivand wrote: > On Wed, 11 Dec 2013, James Rooney wrote: > >> Hi Agus, >> >> Eh perhaps not - is there a more suitable list ? I thought sticking logos >> into maps would be common enough practice here ? I'm not sure gimp is a >> solution since it also d

Re: [R-sig-Geo] add image to plot

2013-12-11 Thread Roger Bivand
On Wed, 11 Dec 2013, James Rooney wrote: Hi Agus, Eh perhaps not - is there a more suitable list ? I thought sticking logos into maps would be common enough practice here ? I'm not sure gimp is a solution since it also depends on ghostscript. I'm starting to tihnk Adobe Ilustrator is my only

Re: [R-sig-Geo] add image to plot

2013-12-11 Thread James Rooney
Hi Agus, Eh perhaps not - is there a more suitable list ? I thought sticking logos into maps would be common enough practice here ? I'm not sure gimp is a solution since it also depends on ghostscript. I'm starting to tihnk Adobe Ilustrator is my only option - which is irritating since I don't h

Re: [R-sig-Geo] add image to plot

2013-12-11 Thread Agustin Lobo
James, Are you sure this is the right list for this question? I would rather use gimp for that purpose. Agus On Wed, Dec 11, 2013 at 12:10 PM, James Rooney wrote: > Anyone got experience with grImport even ? > I'm at my wits end with this. Think I'm going to have to just do it in > photoshop or

Re: [R-sig-Geo] add image to plot

2013-12-11 Thread James Rooney
Anyone got experience with grImport even ? I'm at my wits end with this. Think I'm going to have to just do it in photoshop or something after the fact. James From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] On Behalf Of James Roone

Re: [R-sig-Geo] Error in .gd_SetProject(transient, crs(r))

2013-12-11 Thread Ahmadou Dicko
Until we find a solution to this problem, you can use writeGDAL writeGDAL(as(raster(matrix(1, 1, 1)), "SpatialGridDataFrame"), fname = "test.tif") ## it works On Tue, Dec 10, 2013 at 7:24 PM, Etienne B. Racine wrote: > I have the same problem: saving an unprojected raster as a .tif raises an >