Learn R Programming

comclim (version 0.9.6)

inputcommunitydata: Input data for community climate analysis

Description

A helper function to streamline data formatting

Usage

inputcommunitydata(localcommunity, regionalpool, 
  regionalpoolweights = numeric(), climateniches, observedclimate)

Value

A CommunityClimateInput-class object.

Arguments

localcommunity

The names of species in the local community at tinf.

regionalpool

The names of species in the the regional pool for the local community at tinf.

regionalpoolweights

A numeric vector with same length as regional_pool_tinf, corresponding to sampling weights at tinf. Does not need to sum to one; will be normalized. If left empty, will be auto-filled with all 1s (i.e. uniform sampling).

climateniches

A dataframe with climate niche information for all species in the local community and regional pool at tinf. Should have a taxon column, and then any number of other columns corresponding to climate axes. Each row represents an observation of the species with a given taxon name. Usually you will fill this dataframe by mapping geographic occurrences of species into climate space.

observedclimate

A named numeric vector with names corresponding to the same climate axes as in climate_niches_tinf. Represents the observed climate at tobs.