merge_casts: Merge casts into one file

View source: R/ecopart_merge_casts.R

merge_castsR Documentation

Merge casts into one file

Description

This function takes in a list of casts and will combine them based on a list of possible names to combine

Usage

merge_casts(cast_list, name_map)

Arguments

cast_list

either a list of dataframes or an ecopart_obj

name_map

a list with cast names to combine - names of list items will be new names

Author(s)

Alex Barth

Examples

#merging casts based on station:
name_map = list(
  'gf' = ecopart_example$meta$profileid[which(ecopart_example$meta$stationid == 'gf')],
  'other' = ecopart_example$meta$profileid[which(ecopart_example$meta$stationid != 'gf')]
)

merged_obj <- ecopart_example |> merge_casts(name_map = name_map)
# now there's only two aggregate casts:
names(merged_obj$par_files)
names(merged_obj$zoo_files)

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