define_ophiuroid_size: Combine arm and disc measurements of ophiuroids

Description Usage Arguments Value Examples

View source: R/define_ophiuroid_size.R

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

1
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

1
2
3
4
5
6
7
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/ecomaestro documentation built on Dec. 19, 2021, 3:04 p.m.