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

add matchDim helper #563

Merged
merged 3 commits into from
Mar 13, 2024
Merged

add matchDim helper #563

merged 3 commits into from
Mar 13, 2024

Conversation

fbenke-pik
Copy link
Contributor

@fbenke-pik fbenke-pik commented Mar 13, 2024

Adds a helper to reshape read in magclass objects to match a reference so subsequent operations do not create problems due to mismatched dimensions.

See also #549

R/reportEmi.R Outdated
if (length(vm_demFENonEnergySector) == 0) {
vm_demFENonEnergySector <- NULL
} else {
vm_demFENonEnergySector <- expandMagclass(vm_demFENonEnergySector, vm_demFeSector)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this helper also removes values from third dimension that are not in vm_demFeSector, i am not sure if the trimming should be done here or only further down below in the context of the condition where it crashes (line 304)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is good.

Copy link
Contributor

@orichters orichters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks (probably you are still running buildLibrary?)

Maybe the proper place for this function would be in magclass somewhere, but I actually don't care.

@fbenke-pik
Copy link
Contributor Author

thanks (probably you are still running buildLibrary?)

I will, it just takes forever for remind2

@fbenke-pik fbenke-pik merged commit a49dd5e into pik-piam:master Mar 13, 2024
1 of 2 checks passed
@fbenke-pik fbenke-pik changed the title add expandMagclass helper add matchDim helper Mar 13, 2024
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