Hi @tkariyat
I'm opening this MR for a new function I have developed, CST_Bind(). Its purpose is to bind two s2dv_cube
objects together along a specified dimension.
It is basically a wrapper of abind::abind(). The function has two levels:
- Bind(): designed to work with arrays with named dimensions. It binds the arrays along the dimension specified in along and preserves the dimnames. (abind::abind() does not accept dimension names and it does not preserve the dimension names in the array).
- CST_Bind(): designed to work with
s2dv_cube
objects. It binds the arrays in$data
using Bind() and it also manipulates the $dims, $coords and $attrs to match $data.
For example, if a user binds two s2dv_cubes along the time dimension, the dates in $attrs$Dates
will be bound together as well.
The function is not finished yet, I still need to polish some details. I will let you know when it's done so you can review it and test it.
Thank you,
Victòria