Installation and loading
geohabnet is currently a private package and thusrequires an access togithubrepo . Please request an access from Garrett,Karen<karengarrett@ufl.edu> .
Replace the auth token with your own token obtained from github.
if(!require("geohabnet")){devtools::install_github("GarrettLab/CroplandConnectivity", subdir="geohabnet")}#install.packages("geohabnet") # do not run thislibrary(geohabnet)interactive()Run analysis on initial values. If the function executessuccessfully, resulting maps will be saved under./plots/directory as raster files(.tif extension). Refer to the messages fortheir exact name.
x<-sensitivity_analysis()Check if crop data exists in supported data sources.
search_crop("avocado")Create new raster
myrast<-get_rasters(list(monfreda=c("avocado")))[[1]]# visualizing the intial rasterterra::plot(myrast)Modify link weights. Link weights are used as threshold for cellvalues in the raster. These cell values are filtered on the basis oflink and host density thresholds. Use the raster created earlier abovefor new analysis. If the threshold is too big, then it may result invalid cells to produce connectivity.
results<-sean(link_threshold=0.0000015, rast=myrast, res=24)