Skip to contents

Check that data has the columns and values of a census of every Nereocystis luetkeana plant counted by in situ surveys, for kb_predict_biomass_in_situ().

Usage

kb_check_data_size_census_nereo(
  data,
  x_name = chk::deparse_backtick_chk(substitute(data))
)

Arguments

data

A data frame of counted plants, one row per plant.

x_name

A string naming the data for error messages.

Value

data, invisibly.

Details

Each row is one counted plant; its site and year are those of its survey. Required columns:

  • survey_id, the survey the plant was counted in (a survey_id of the in situ data).

  • diameter_mm, the plant diameter, measured as in the weight data (mm, > 0).

Optional columns:

  • partial, whether the plant counts as half, such as a plant on the edge of a transect (TRUE or FALSE).

Other columns are ignored.

Examples

size_census <- data.frame(
  survey_id = "s1", diameter_mm = c(32, 41), partial = c(FALSE, TRUE)
)
kb_check_data_size_census_nereo(size_census)