View source: R/Sim_Community.R
community | R Documentation |
Creates a spatial community object with defined extent and with coordinates and species identities of all individuals in the community.
community(x, y, spec_id, xrange = c(0, 1), yrange = c(0, 1))
x , y |
Coordinates of individuals (numeric) |
spec_id |
Species names or IDs; can be integers, characters or factors |
xrange |
Extent of the community in x-direction (numeric vector of length 2) |
yrange |
Extent of the community in y-direction (numeric vector of length 2) |
Community object which includes three items:
census: data.frame with three columns: x, y, and species names for each individual
x_min_max: extent of the community in x-direction
y_min_max: extent of the community in y-direction
x <- runif(100)
y <- runif(100)
species_names <- rep(paste("species",1:10, sep = ""), each = 10)
com1 <- community(x,y, species_names)
plot(com1)
summary(com1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.