pik-piam / magclass

R package | Data Class and Tools for Handling Spatial-Temporal Data
GNU Lesser General Public License v3.0
4 stars 24 forks source link

have matchDim(x, ref = NULL) return x #176

Closed 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q closed 3 months ago

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 3 months ago

In the REMIND reporting, if the reference whose structure some magpie object should match is NULL, then that magpie object is not going to be used down the line (since we use R variables being NULL as an indicator for the GAMS model configuration). Just returning x in that case removes tedious tests and potential errors.

fbenke-pik commented 3 months ago

Looks good to me, but Jan has the final say.