bin_taxa: Bin observations by taxa according to some common factor This...

View source: R/gen_bin-taxa.R

bin_taxaR Documentation

Bin observations by taxa according to some common factor This version allows for summing over some factor like dry mass or volume

Description

It will sum for each individual in a depth bin by taxa

Usage

bin_taxa(
  df,
  depth_breaks,
  zooscan = F,
  cat_col = NULL,
  func_col = "taxo_name",
  func = length,
  max_d = NULL,
  force_bins = F
)

Arguments

df

a data frame should have a taxo_name, name, or object_annotation_category column

depth_breaks

the limits of what bins should be made

zooscan

if the df is a zooscan export set to true, default false

cat_col

a category other than taxa to bin by

func_col

a single character vector of the value to apply function to; esd, biomass, drymass, etc

func

the function to apply

max_d

the maximum possible depth for a bin

force_bins

set to true if you want to ensure observations for all 0's

Author(s)

Alex Barth


TheAlexBarth/EcotaxaTools documentation built on Nov. 14, 2024, 8:27 p.m.