Title: | Analyze biotic homogenization of landscapes |
---|---|
Description: | Tools for assessing exotic species' contributions to landscape homogeneity using average pairwise Jaccard similarity and an analytical approximation derived in Harris et al. (2011, "Occupancy is nine-tenths of the law," The American Naturalist). Also includes a randomization method for assessing sources of model error. |
Authors: | David J. Harris <[email protected]> |
Maintainer: | David J. Harris <[email protected]> |
License: | GPL-2 | Artistic-2.0 |
Version: | 0.1.2 |
Built: | 2024-11-03 03:34:22 UTC |
Source: | https://github.com/davharris/blender |
blend
finds native landscape similarity and exotic species'
contributions to landscape homogeneity using average pairwise Jaccard
similarity (J.Bar) and an analytical approximation (J.Star) described
in Harris et al. (2011, "Occupancy is nine-tenths of the law," The American
Naturalist) and in blender.basics.
blend
can be called on a list
of data.frame
s or on a
character vector pointing to a directory containing data as .csv files.
If blend
is called multiple landscapes, it will analyze each one
individually and then combine the results together in a
blended.landscape.bundle
, which has its own method for plotting.
blend(x, warn = FALSE)
blend(x, warn = FALSE)
x |
Either the file path to your landscapes as .csv files (character vector)
or a |
warn |
Logical. Should |
J.Bar, J.Star, and P.Star are defined in Harris et al. (2011) and in the documentation for blender.basics.
blend
expects a character vector pointing to .csv
files
on your hard drive or a list
of data.frame
s.
The files or
data.frames
must be named to include a landscape ID (e.g.
"Iowa" or "Region 7") before the word "native" or "exotic", separated
by a space, as in the included PLANTS
data set. blend
needs these names to match for the native and
exotic landscape in order to compare them. Any
landscapes that do not have a counterpart will not be included in the
output. If blend
cannot find
any matching native-exotic landscape pairs, it will return an error.
blend
expects sites as columns and species as rows. In .csv files,
the first row must be site names and the first column must be species names.
If you input data as data.frame
s, these attributes should be
included as dimnames
instead. The column names, corresponding to
site names, must match between the native and exotic landscapes.
The body of your files or data.frames
should be 1
s
indicating species presence at a given site, or 0
s
for absences.
blend
returns a blended.landscape
object if called on a
single landscape or a blended.landscape.bundle
if called on more
than one. A bundle includes all of the below for each landscape,
plus a summary
data.frame
.
blended.landscape
objects contain:
name |
The name of the landscape analyzed (e.g. "Nebraska" if the contents of
|
J.Bar , J.Star
|
|
delta.J.Bar , delta.J.Star
|
|
R2 |
The proportion of variance in single-species changes in J.Bar explained by variance in single-species changes in J.Star. |
threshold |
The proportion of sites that must be occupied by an exotic species for
it to have no net effect on |
p.Star |
The proportion of sites that must be occupied by an exotic species for it to have no effect on mean similarity, according to the effective occupancy equation in Harris et al.(which is based on J.Star) |
nadir |
The level of exotic occupancy for which mean similarity is minimized.
Calculated by smoothing the
observed |
results.table |
A summary |
species.delta.table |
A |
scoop |
A set of points used for plotting the "scoop"-shaped model predictions |
native , exotic
|
The original imported landscapes |
If called on more than one landscape, blend
produces a
blended.landscape.bundle
, which includes
one blended.landscape
for each landscape included,
as well as a data.frame
called summary
that includes all
the information from each landscape's resuls.table
.
David Jay Harris <[email protected]>
Harris, D. J., K. G. Smith, and P. J. Hanly. 2011. "Occupancy is nine-tenths of the law: Occupancy rates determine the homogenizing and differentiating effects of exotic species" The American Naturalist.
data(PLANTS) wy.results = blend(PLANTS[c("WY native table", "WY exotic table")]) # print a summary of the results wy.results # plot contributions of individual exotic species to mean similarity plot(wy.results) # blend a set of five landscapes simultaneously five.results = blend(PLANTS[1:(5 * 2)]) ## Not run: # Alternative method of calling blend using a directory five.results = blend("Users/Dave/Documents/similarity stuff/state matrices") ## End(Not run) # print a summary of the results across all landscapes five.results # plot predictions vs. observations across all landscapes plot(five.results) # plot contributions of individual exotic species to mean similarity in # the first landscape plot(five.results[[1]])
data(PLANTS) wy.results = blend(PLANTS[c("WY native table", "WY exotic table")]) # print a summary of the results wy.results # plot contributions of individual exotic species to mean similarity plot(wy.results) # blend a set of five landscapes simultaneously five.results = blend(PLANTS[1:(5 * 2)]) ## Not run: # Alternative method of calling blend using a directory five.results = blend("Users/Dave/Documents/similarity stuff/state matrices") ## End(Not run) # print a summary of the results across all landscapes five.results # plot predictions vs. observations across all landscapes plot(five.results) # plot contributions of individual exotic species to mean similarity in # the first landscape plot(five.results[[1]])
jbar
calculates average Jaccard similarity among sites (columns)
in your landscape as the expected ratio of the intersection between two
sites to to their union:
J.Bar = mean(intersection/union)
jstar
gives an approximation of this value from species
occupancy rates (row sums) as the ratio of the expected intersection
between two randomly chosen sites to the expected union:
J.Star = mean(intersection)/mean(union)
pstar
gives the "effective occupancy" of a landscape, defined in
Harris et al. (2011). A landscape composed entirely of species with this
occupancy rate would have the same J.Star value as the input landscape.
jbar(x) jstar(x, n = NULL) pstar(x, n = NULL)
jbar(x) jstar(x, n = NULL) pstar(x, n = NULL)
x |
For |
n |
The number of sites in your landscape. Only needed for |
David Jay Harris <[email protected]>
Harris, D. J., K. G. Smith, and P. J. Hanly. 2011. "Occupancy is nine-tenths of the law: Occupancy rates determine the homogenizing and differentiating effects of exotic species." The American Naturalist.
data(PLANTS) # Calculate key values for Wyoming from raw data landscape = PLANTS[["WY native table"]] jbar(landscape) jstar(landscape) pstar(landscape) # jstar and pstar also work if given row means and landscape sizes. # jbar requires spatial information that is lost during this averaging. occupancy = rowMeans(landscape) nsites = ncol(landscape) jstar(occupancy, nsites) pstar(occupancy, nsites)
data(PLANTS) # Calculate key values for Wyoming from raw data landscape = PLANTS[["WY native table"]] jbar(landscape) jstar(landscape) pstar(landscape) # jstar and pstar also work if given row means and landscape sizes. # jbar requires spatial information that is lost during this averaging. occupancy = rowMeans(landscape) nsites = ncol(landscape) jstar(occupancy, nsites) pstar(occupancy, nsites)
This data set includes county-level occupancy for native and exotic plants in 47 US states
data(PLANTS)
data(PLANTS)
List
containing a data.frame
for the native species in
each state and a second data.frame
for
the exotic species in each state. Each data frame is organized with
counties as columns and species as rows.
Per the USDA PLANTS Database website, species were listed as "native" if their L48 native status was listed as N, N?, NI, or NI? and "exotic" if their L48 native status was listed as GP, GP?, I, I?, N?I, W, or W?. See http://plants.usda.gov/about_adv_search.html for descriptions of these terms.
The USDA PLANTS Database does not include county-level data on Alaska or Maryland. Hawaii was excluded from this data set because L48 native status did not apply to it.
The USDA PLANTS Database can be found at http://plants.usda.gov/
USDA, NRCS. 2010. The PLANTS Database (http://plants.usda.gov, November 23, 2010). National Plant Data Center, Baton Rouge, LA 70874-4490 USA.
Used as an example in Harris et al. 2011. "Occupancy is nine-tenths of the law" The American Naturalist.
reduce
randomly selects species for inclusion in a reduced-richness
landscape based on the original. shuffle
randomizes species locations
among sites.
blender.reduce(landscape, richness) blender.shuffle(landscape)
blender.reduce(landscape, richness) blender.shuffle(landscape)
landscape |
A binary presence-absence |
richness |
An integer number of species to include in a reduced landscape |
Species are sampled by reduce
without replacement. Species
are randomized by shuffle
in order to preserve their occupancy
rates (row sums) but not local richness (column sums).
A data.frame
based on landscape
David J. Harris <[email protected]>
These functions were used in the simulations in Harris, D. J., K. G. Smith, and P. J. Hanly. 2011. "Occupancy is nine-tenths of the law: Occupancy rates determine the homogenizing and differentiating effects of exotic species." The American Naturalist.