Learn R Programming

raptr (version 0.0.3)

spp.plot: Plot species

Description

This function plots the distribution of species across the study area.

Usage

spp.plot(x, species, ...)

# S3 method for RapData spp.plot(x, species, prob.color.palette = "YlGnBu", pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"), basemap = "none", alpha = ifelse(basemap == "none", 1, 0.7), grayscale = FALSE, main = NULL, force.reset = FALSE, ...)

# S3 method for RapUnsolved spp.plot(x, species, prob.color.palette = "YlGnBu", pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"), basemap = "none", alpha = ifelse(basemap == "none", 1, 0.7), grayscale = FALSE, main = NULL, force.reset = FALSE, ...)

# S3 method for RapSolved spp.plot(x, species, y = 0, prob.color.palette = "YlGnBu", pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"), basemap = "none", alpha = ifelse(basemap == "none", 1, 0.7), grayscale = FALSE, main = NULL, force.reset = FALSE, ...)

Arguments

x

RapData, RapUnsolved, or RapSolved object.

species

character name of species, or integer index for species.

...

not used.

prob.color.palette

character name of color palette to denote probability of occupancy of the species in planning units (see brewer.pal). Defaults to 'YlGnBu'.

pu.color.palette

character name of colors or color palette (brewer.pal) to indicate planning unit statuses. Defaults to c('grey30', 'green', 'black', 'red') which indicate non selected, selected, locked in, and locked out (respectively).

basemap

character object indicating the type of basemap to use (see link{basemap}). Use either 'none', 'roadmap', 'mobile', 'satellite', 'terrain', 'hybrid', 'mapmaker-roadmap', 'mapmaker-hybrid'. Defaults to 'none'.

alpha

numeric value to indicate how transparent the planning unit colors should be.

grayscale

logical should the basemap be gray-scaled?

main

character title for the plot. Defaults to NULL and a default title is used.

force.reset

logical if basemap data has been cached, should it be re-downloaded?

y

NULL integer 0 to return values for best solution, integer value greater than 0 for y'th solution value.

Examples

Run this code
# NOT RUN {
# load RapSolved objects
data(sim_ru, sim_rs)
# plot first species in sim_ru
spp.plot(sim_ru, species=1)
# plot 'bimodal' species in sim_rs
spp.plot(sim_rs, species='bimodal')
# }

Run the code above in your browser using DataLab