Skip to contents

Compute mean pairwise distance for each species co-occurring in sites and time slices

Usage

IndivSpec_site_mpd(
  df.TS.TE,
  df.occ,
  time.slice,
  trait,
  round.digits = 1,
  species = "species",
  TS = "TS",
  TE = "TE",
  Max.age = "Max.age",
  Min.age = "Min.age",
  site = "site"
)

Arguments

df.TS.TE

a data frame object containing at least three columns. Species names, origination time and extinction time for each species.

df.occ

a data frame object containing the occurrence records for each species. This must have at least a column indicating the name of species, its minimum and maximum age estimate, and its site location ID.

time.slice

scalar indicating the time interval between consecutive time slices.

trait

Numeric indicating the values of the traits for each species

round.digits

scalar indicating the number of digits for time of origination and time for extinction.

species

character indicating the name of the column of the data frame containing the species name information.

TS

character indicating the name of the columns of the data frame containing the information on origination time.

TE

character indicating the name of the column of the data frame containing the information on extinction time.

Max.age

character indicating the name of the column in df.occ containing the upper age limit for occurrence record.

Min.age

character indicating the name of the column in df.occ containing the lower age limit for occurrence record.

site

character indicating the name of the column in df.occ containing the information on site location.

Value

A data frame containing the name of species, its mean mpd value calculated by each time slice considering all sites in which the species occur in that time slice