Re: [R-sig-Geo] uniformly sample points on a border of a polygon

2016-10-14 Thread mgm mgm
Another possible solution is to use the spsurvey package, and think of each edge as a level of stratification and use the grts function to design a survey of sample points on the edges. An advantage of the grts function is that it uses a local neighborhood variance estimator, which can produce

[R-sig-Geo] Problem with predict() from raster stack containing factor

2016-10-14 Thread Katherine Ransom
Hi All, I am puzzled by some predictions I am getting from the predict() function on a raster stack containing a factor. I trained a gbm() model on 25 variables, one of which is a factor. Then, I am using the predict() function on a raster stack created from a group of gridded ESRI .txt files, one

Re: [R-sig-Geo] [FORGED] uniformly sample points on a border of a polygon

2016-10-14 Thread Paolo Piras
Dear Adrian, even this solution is pretty cool. Again, thanks to all who suggested me how to do that. Best Paolo Da: Adrian Baddeley Inviato: venerd� 14 ottobre 2016 02.14 A: Paolo Piras; Rolf Turner Cc: r-sig-geo; Ege Rubak

[R-sig-Geo] Can't run mk.test for raster stack

2016-10-14 Thread Mandakh Nyamtseren 2 via R-sig-Geo
Dear all,I'm trying to use MannKendall test to get trend of 10 year aridity data. Can some one help me to correct this code. >library(raster) >library(trend) >setwd("D:/ClimateData/MK_aridity") >list <- list.files(pattern = "*.asc") >RasterStack <- Stack(list) >test <- calc(r, fun=function(x)