Skip to contents

Function to get the heights on a landscape for a set of species points. For a given set of species coordinates in morphospace, this function finds the closest point on the landscape grid, and assigns the values associated to that grid point to that species.

Usage

sp_vals_from_grid(x, y)

Arguments

x

A 'by_Wprime' or 'PO_List' object - contains the functional adaptive landscapes or Pareto landscapes you want to extract heights from.

y

A dataframe containing species information morphospace. The coordinates columns must be labelled 'x' and 'y'.

Value

A dataframe containing the species information from y, with additional columns extracted from the landscape data