QGIS/python/plugins/processing/r/scripts/Kernel_h_ref.rsx
Victor Olaya 7165e882cd [processing] R improvements
This commit:

Deletes Example scripts

Replaces Example scripts with more up to date versions

Adds general categories for r scripts: Basic statistics, Vector processing, Raster processing and Point pattern analysis

adds help files to all r scripts

Adds a groups of r scripts entitled Home range analysis, that includes Kernel href, LSCV Kernel, Minimum convex polygon, single linkage cluster analysis and characteristic hull method, using adehabitatHR()

Adds the following R scripts contributed by Yury Ryabov ( riabovvv(at)gmail.com ): Advanced raster histogram, Monte carlo spatial randomness, Relative distribution (distance covariate), Relative distribution (raster covariate),
2013-11-11 22:45:06 +01:00

16 lines
446 B
R

##Home Range Analysis=group
##Layer=vector
##Field=Field Layer
##Grid=number 10
##Percentage=number 10
##Home_ranges=Output vector
##Folder=folder
library(adehabitatHR)
Layer[,Field]->relocs
kud <- kernelUD(relocs, grid=,Grid, h="href")
names(kud)->Names
for(i in 1:length(Names)){
writeGDAL(kud[[i]],paste(paste(Folder,"/",sep=""),paste(Names[i],".tiff",sep=""), sep=""),drivername="GTiff")
}
Home_ranges<- getverticeshr(kud,percent=Percentage)