Learn R Programming

⚠️There's a newer version (1.0.1) of this package.Take me there.

raptr

Biodiversity is in crisis. The overarching aim of conservation is to preserve biodiversity patterns and processes. To this end, protected areas are established to buffer species and preserve biodiversity processes. But resources are limited and so protected areas must be cost-effective. This package contains tools to generate plans for protected areas (prioritizations), using spatially explicit targets for biodiversity patterns and processes. To obtain solutions in a feasible amount of time, this package uses the commercial 'Gurobi' software package (obtained from http://www.gurobi.com/). Additionally, the 'rgurobi' package can also be installed to provide extra functionality (obtained from http://github.com/jeffreyhanson/rgurobi).

This package depends on several packages which can be dificult to install under Linux and Mac operating systems.

Linux users can install them typing the following code into the terminal:

sudo apt-get update
sudo apt-get install libgdal-dev
sudo apt-get install libproj-dev
sudo apt-get build-dep r-cran-rgl

Mac users can install them using this code in the terminal:

brew install Caskroom/cask/xquartz
brew install gdal
Rscript -e "setRepositories(ind=1:2);install.packages(c('rgdal','rgeos'))"

To install the development version, use the following R code:

if (!require('devtools'))
	install.packages('devtools', repo='http://cran.rstudio.com', dep=TRUE)
devtools:::install_github('jeffreyhanson/raptr')

Once this package has been installed, you can read through the vignette for a tutorial on how to use it.

View it here, or by running this R code:

# open vignette in web browser
vignette('raptr', package='raptr')

If this R package helped you, please cite it.

Hanson J.O., Rhodes J. R., Fuller R. A. (2015). raptr: Representative and Adequate Prioritisation Toolkit in R. Version 0.0.1.

Copy Link

Version

Install

install.packages('raptr')

Monthly Downloads

771

Version

0.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jeffrey O Hanson

Last Published

October 28th, 2016

Functions in raptr (0.0.1)

is.cached

Test if hash is cached in a Rap object
logging.file

Log file
dp.subset

Subset demand points
blank.raster

Blank raster
DemandPoints

Create new DemandPoints object
make.DemandPoints

Generate demand points for RAP
casestudy_data

Case-study dataset for a conservation planning exercise
is.comparable

Compare Rap objects
GurobiOpts

Create GurobiOpts object
is.gdalInstalled

Test if GDAL is installed on computer
is.GurobiInstalled

Test if Gurobi is installed on computer
PlanningUnitPoints

Create new PlanningUnitPoints object
ManualOpts

Create ManualOpts object
prob.subset

Subset probabilities above a threshold
plot

Plot object
pu.subset

Subset planning units
PolySet-class

PolySet
maximum.targets

Maximum targets
names

Names
print

Print objects
make.RapData

Make data for RAP using minimal inputs
RapResults

Create RapResults object
RapSolved

Create new RapSolved object
RapUnreliableOpts

Create RapUnreliableOpts object
randomPoints

Sample random points from a RasterLayer
rap

Generate prioritisations using RAP
RapUnsolved

Create a new RapUnsolved object
RapReliableOpts

Create RapReliableOpts object
raptr

raptr: Representative and Adequate Prioritisation Toolkit in R
RapData

Create new RapData object
sim.pus

Simulate planning units
RapOpts-class

RapOpts class
rrap.proportion.held

Proportion held using reliable RAP formulation.
sim.space

Simulate attribute space data for RAP
score

Solution score
selections

Extract solution selections
show

Show objects
rasterizeGDAL

Rasterize polygon data using GDAL
read.RapResults

Read RAP results
sim.species

Simulate species distribution data for RAP
simulated_data

Simulated dataset for a conservation planning exercise
spp.subset

Subset species
spp.plot

Plot species
update

Update object
space.target

Attribute space targets
space.held

Extract attribute space held for a solution
space.plot

Plot space
summary

Summary of solutions
SpatialPolygons2PolySet

Convert SpatialPolygons to PolySet data
solve

Solve RAP object
SolverOpts-class

SolverOpts class
calcSpeciesAverageInPus

Calculate average value for species data in planning units
calcBoundaryData

Calculate boundary data for planning units
urap.proportion.held

Proportion held using unreliable RAP formulation.
amount.target

Amount targets
amount.held

Extract amount held for a solution
AttributeSpace

Create new AttributeSpace object
as.list

Convert object to list.
cache

Get and set cache Methods
basemap

Basemap
AttributeSpaces

Create new AttributeSpaces object