powered by
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))
Coordinates of individuals (numeric)
Species names or IDs; can be integers, characters or factors
Extent of the community in x-direction (numeric vector of length 2)
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
# NOT RUN { 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) # }
Run the code above in your browser using DataLab