define_ophiuroid_size: Combine arm and disc measurements of ophiuroids

View source: R/define_ophiuroid_size.R

define_ophiuroid_sizeR Documentation

Combine arm and disc measurements of ophiuroids

Description

Note that this function only works under my measure protocol for ophiuroids. If you use different measurement protocols while using this function, dubious results might appear. See example for more insight.

Usage

define_ophiuroid_size(data, protocol_ophiuroid, grouping_variables)

Arguments

data

A long format data that had their biovolume stored in the column "Size".

protocol_ophiuroid

Currently have two options:.

  • all_arms: calculate the biovolume of one ophiuroid by simply add all the arms and and their respective disc.

  • longest_arms : calculate the biovolume of one ophiuroid by seeking the longest arm that is still attached to the disc and assume all arms are of the same length as the longest arms.

grouping_variables

A character vector of the subset of column names. The variables should at least include the dates, stations, and replicates to prevent individuals across different samples from being added together.

Value

The modified input data with the size of the ophiuroids manipulated

Examples

a <- data.frame(
  Taxon = rep("Ophiuroidea", 6),
  Size = runif(6, min = 1, max = 5),
  Note = c("Dics-1", rep("Arm-1", 4), "Arm")
)
define_ophiuroid_size(data = a, protocol = "all_arms")
define_ophiuroid_size(data = a, protocol = "longest_arm")

chenyenting1998/GRSPRSThesisData documentation built on March 19, 2022, 8:35 a.m.