runBeetle: Wrapper function to analyse the phylogenetic spread of...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/runBeetle.R

Description

The phylogenetic spreading of the tibetan carabidae seems to be correlated to valley linkage and available humidity. Long term humidity is bound to precipitation and morphometry. It is obvious that the estimation of spreeading speed and range is in no case a simple euclidian one. runBeetle provides a first better estimation using a cost or friction analysis assuming that the spread is following natural lines of wetness e.g. valleys, humidity gradients...whatever I'am not a beetle ask the beetle beetle guy.

Usage

1
2
runBeetle(rootDir,workingDir="cost",inputData=NULL,costType="tci",
 externalCostRaster=NULL,internalCost=TRUE)

Arguments

rootDir

project directory

workingDir

working directory

inputData

location data containing obligatory the cols lon,lat and optional a code col. The format has to be a data frame see example.

costType

used if internalCost = TRUE. default is "tci" you can choose "tci" "dem.filled" or "accu" see details for more information

internalCost

default = TRUE switches to external provided GTiff file wich has to be named cost.tifx

dump

default = FALSE if TRUE export r.terraflow products to GTiff

usedump

default = FALSE instead of running r.terraflow again use products products to GTiff

externalCostRaster

default = NULL you may provide a GTiff file with the name cost.tif NOTE you have to set internalCost = FALSE

Details

The core of the analysis is an isotropic/anisotropic least cost path calculation. By default the cost surface is assumed to be a local derivate of the morphometry with respect to the potential soil humidity. A perfect approch to derive such information is the use of a Digital Elevation Model DEM and some corresponding derivates as the Topographic Convergence Index.

If you choose "tci" (default) the cost surface provides an estimation of rainwater runoff availability to plants based on specific catchment area (A) and local slope (b) such that TCI = ln(A/tan b) (Beven & Kirkby, 1979). This seems be pretty straightforward and fairly suitable for the beetles "behaviour.

If you chosse "accu" a typical accumulation cost grid from the original DEM will be used

If you choose "dem.filled" a typical accumulation cost grid from the hydrologically corrected DEM will be used

For the r.walk algorithm the non accumulated data is used.

Value

runBeetle returns:
(a) a dataframe with the (a) euclidian distances, (b) cost distance (isotropic cost surface) and (c) the walk distance (anisotropic cost surface)

Author(s)

Chris Reudenbach
Maintainer: Chris REudenbach reudenbach@uni-marburg.de

References

Schmidt, J., B<c3><b6>hner, J., Brandl, R. & Opgenoorth, L. (in review): Mass elevation and lee effect override latitudinal effects in determining the distribution ranges of species: Ground beetles from the Himalaya-Tibet Orogen. <e2><80><93> PLoS ONE.

GRASS70 SAGA GIS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
#### NOTE: You obligatory need GRASS70

library(doParallel)
library(foreach)
library(raster)
library(sp)
library(gdalUtils)
library(rgdal)

### NOTE: the area is specifified and automatically downloaded (SRTM) by the input data extent plus a "zone"
### read a csv file
fn<-system.file("bug.csv", package="biomix")
beetleLocs<-read.csv2(fn,header = TRUE,sep = ',',dec = '.',stringsAsFactors=FALSE)

### use some arbitrary locations from scratch
beetleLocs <- as.list(c("86.83", "28.20", "100","84.58", "28.67", "200" ,"83.87", "28.80", "300"))
beetleLocs <- data.frame(matrix(as.numeric(unlist(beetleLocs)), nrow=3, byrow=T),stringsAsFactors=FALSE)
colnames(beetleLocs)<-c("lon","lat","code")
beetleDist<-runBeetle(rootDir = "/home/creu/proj/beetle" ,inputData = beetleLocs, usedump=TRUE, walk=TRUE)

## End(Not run)

gisma/robubu documentation built on May 17, 2019, 5:28 a.m.