Skip to contents

Checks that the Ecopath parameter data frame has the required columns and that the group names are unique and that all groups in the species_to_groups list are included in the data frame.

Usage

validEcopathParams(ecopath_params, species_to_groups)

Arguments

ecopath_params

A data frame with Ecopath parameters for each group as exported by the Ecopath software.

species_to_groups

A named list where the names are mizer species and the values are vectors of the Ecopath groups/stanzas making up the species.

Value

The validated Ecopath parameter data frame

Details

The function also deals with the fact that the column names in the Ecopath data frame can be different from the expected names if it was loaded in with read.csv instead of readr::read_csv.