data_prep: data_preperation-class

table_to_species_dataR Documentation

data_preperation-class

Description

prepares table of observational records into a sites x species matrix for use in ecomix.

Usage

table_to_species_data(
  observation_data,
  site_id = "site_id",
  species_id = "species_id",
  measurement_id = NULL
)

make_mixture_data(species_data, covariate_data)

Arguments

observation_data

data to be imported into R. A table of species occurrences and site records.

site_id

Name of column that contains site names /IDs.

species_id

Name of column that contains species information/ID.

measurement_id

Name of column that contains species observational data. eg, 'occurrence', 'abundance' or 'biomass'.

species_data

A character string providing the name of the column in ⁠data⁠ that contains the counts

covariate_data

A character string providing the name of the column in ⁠data⁠ that contains the binary occurence data

Value

A sites x species matrix to used as species_data in ecomix models.

A list containing the following elements:

species_data

A matrix of occurrence, counts, biomass, or...

covariate_data

The design matrix for the global covariates

Author(s)

Skipton Woolley


skiptoniam/ecomix documentation built on Sept. 14, 2023, 6:04 a.m.