Skip to contents

Check that data contains the columns required to fit the Nereocystis luetkeana size model, with appropriate types and values.

Usage

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

Arguments

data

A data frame of a size sample, one row per measured plant.

x_name

A string naming the data for error messages.

Value

data, invisibly.

Details

Each row is one measured plant, linked to a site and year rather than to a specific in situ survey. Required columns:

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

  • site, the site the plant was measured at (any text).

  • year, the year the plant was measured (whole number or text).

Other columns are ignored.

Examples

data <- data.frame(
  diameter_mm = c(22, 41), site = factor(c("a", "b")), year = c(2020, 2021)
)
kb_check_data_size_sample_nereo(data)