R-Forge Logo

grainscape package

Grains of connectivity and minimum planar graph modelling of landscape connectivity using resistance surfaces
Paul Galpern1,2, Andrew Fall, Micheline Manseau
1Natural Resources Institute, University of Manitoba, Winnipeg, Manitoba, Canada
2Email: pgalpern@gmail.com, Web: borealscape.ca


Given a landscape resistance surface, functions in this package create grains of connectivity and minimum planar graph models that can be used to calculate effective distances for landscape connectivity at multiple scales. Distributed with SELES (Spatially Explicit Landscape Event Simulator; Fall and Fall, 2001) software. The package will currently run only on a Windows-based platform.

grainscape now works correctly with R 2.15.2 and current versions of igraph and raster. (igraph0 is no longer required)

Manual (PDF)
Tutorial (PDF)

R-Forge project page



Installation

STEP 1: Install package dependencies

At the R prompt:
install.packages("raster")
install.packages("igraph")
install.packages("rgeos")


The first and second lines are required.
The third package is optional. (rgeos is used for optional visualizations.)
R will download and install these packages (and dependencies) from the CRAN repository.


STEP 2: Install grainscape
...If you are using the most recent version of R...

At the R prompt:
install.packages("grainscape", repos="http://R-Forge.R-project.org")

R will download and install grainscape from the R-forge repository.


...If you are using an earlier version of R, or you are not sure...

1. Download the grainscape binary (ZIP) package from here.

2. Save it to some location (e.g. c:\users\yourname\downloads\))

3. At the R prompt:
install.packages("c:/users/yourname/downloads/grainscape_0.2.zip")


R will install grainscape using the ZIP file you downloaded.
N.B. The version number may change over time. Please adjust accordingly.


STEP 3: Get started

1. At the R prompt:
library(grainscape)
?grainscape


Review the manual and the vignette tutorial