Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q
Copy link
Member

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.

R/matchDim.R Outdated Show resolved Hide resolved
@fbenke-pik
Copy link
Contributor

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

- add guardians for the type of x, ref, and dim
- adjust dim error message to display actual argument
- reformat documentation using markdown
- use correct class name in documentation
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q merged commit 1dc9c10 into pik-piam:master Jul 2, 2024
2 checks passed
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q deleted the dev/ignore_NULL_matchDim branch July 2, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants