| CST_BindDim | R Documentation |
This function combines the data inside two or more objects of class
s2dv_cube along the specified along dimension, and modifies the
dimensions, coordinates and attributes accordingly, producing a result that
contains the complete metadata for all variables, time steps and spatial
coordinates that are bound in the process. It ensures that the information
inside the s2dv_cube remains coherent with the data it contains.
If the dimension specified in along is among the time dimensions in
attrs$Dates, the dates arrays are also bound along this dimension.
The load_parameters and when attributes of the first cube
are preserved. The source_files attribute is bound along the
var_dim and dat_dim dimensions.
CST_BindDim(x, along, var_dim = NULL, dat_dim = NULL)
x |
Two or more objects of class |
along |
A character string indicating the name of the binding dimension. |
var_dim |
A character string indicating the name of the variable dimension. The default value is NULL. Specifying this dimension ensures |
dat_dim |
A character string indicating the name of dataset dimension. The default value is NULL. Specifying this dimension ensures the dataset metadata is correctly preserved. |
An object of class s2dv_cube with the combined data,
dimensions, coordinates and attributes of the elements in x.
Agudetse Roures Victoria, victoria.agudetse@bsc.es
abind
# Example with sample data:
# Check original dimensions and coordinates
lonlat_temp$exp$dims
lonlat_temp$obs$dims
# Bind both datasets along the member dimension
res <- CST_BindDim(x = list(lonlat_temp$exp, lonlat_temp$obs),
along = "member",
var_dim = NULL,
dat_dim = "dat")
# Check new dimensions and coordinates
res$dims
names(res$coords)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.