list_to_tib()

A large portion of the ecopart_obj framework has lists. When there are several, similar lists it can at times be useful to mash them into a single df. This can be done with list_to_tib(). This function takes a list (which must have all elements of it as dataframes/tibbles) and mushes them into a tibble. This is similar to using do.call(rbind, list). However, list_to_tib() creates a column in the tibble for the name of the list it came from. This is extremely useful for lists which have the cast name as the items. For example:

library(EcotaxaTools)
ecopart_example$zoo_files |> list_to_tib('cast')
# A tibble: 25,054 × 91
   orig_id    objid name  taxo_hierarchy classif_qual depth_including… psampleid
   <chr>      <dbl> <chr> <chr>          <chr>                   <dbl>     <dbl>
 1 bats361_… 1.46e8 detr… not-living>de… V                        54       33963
 2 bats361_… 1.46e8 detr… not-living>de… V                        43.4     33963
 3 bats361_… 1.46e8 detr… not-living>de… V                        52.1     33963
 4 bats361_… 1.46e8 detr… not-living>de… V                        23.4     33963
 5 bats361_… 1.46e8 detr… not-living>de… V                        53.3     33963
 6 bats361_… 1.46e8 detr… not-living>de… V                        74.7     33963
 7 bats361_… 1.46e8 badf… not-living>ar… V                        70.4     33963
 8 bats361_… 1.46e8 badf… not-living>ar… V                        42.5     33963
 9 bats361_… 1.46e8 detr… not-living>de… V                        57.1     33963
10 bats361_… 1.46e8 detr… not-living>de… V                        83.1     33963
# … with 25,044 more rows, and 84 more variables: `%area` <dbl>, angle <dbl>,
#   area <dbl>, area_exc <dbl>, areai <dbl>, bx <dbl>, by <dbl>, cdexc <dbl>,
#   centroids <dbl>, circ. <dbl>, circex <dbl>, compentropy <dbl>,
#   compm1 <dbl>, compm2 <dbl>, compm3 <dbl>, compmean <dbl>, compslope <dbl>,
#   convarea <dbl>, convarea_area <dbl>, convperim <dbl>,
#   convperim_perim <dbl>, cv <dbl>, elongation <dbl>, esd <dbl>, fcons <dbl>,
#   feret <dbl>, feretareaexc <dbl>, fractal <dbl>, height <dbl>, …