Learn R Programming

comclim (version 0.9.6)

generatedemodata: Simulation data for demonstration analyses.

Description

Creates a CommunityClimateInput-class object for usage in demos. Creates a regional pool of species with normally distributed climate niches within some region of climate space. Then chooses a subset of these species with climate niches closer to the origin to represent the local community, and defines an observed climate at another location in climate space.

Usage

generatedemodata(num_regionalpool = 50, num_community = 5, 
  num_occurrences = 40, num_climateaxes = 3, observed = 0)

Value

A CommunityClimateInput-class object.

Arguments

num_regionalpool

Number of species in the regional pool

num_community

Number of species in the local community

num_occurrences

Number of occurrences to simulate as the basis for each species' climate niche

num_climateaxes

Number of climate axes

observed

The location of the observed climate. Must be a scalar; the function will copy the value to all axes.

Examples

Run this code
# a five-dimensional climate space with ten species in the local community
community_demo <- generatedemodata(num_community=10, num_climateaxes=5)



Run the code above in your browser using DataLab