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

Downstream problems with rmmAutofillEnvironment() when transfer argument is greater than 1 #4

Open
hannahlowens opened this issue Jun 28, 2024 · 2 comments

Comments

@hannahlowens
Copy link
Collaborator

I have a model I want to sequentially transfer to different future time points. This part is fine:

rmm <- rmmAutofillEnvironment(rmm,midCentury,transfer=1) # for transfer environment 1
rmm <- rmmAutofillEnvironment(rmm,lateCentury,transfer=2) # for transfer environment 2

but later, when I do rmmCheckFinalize(rmm), it gives me...

Element name '$data$transfer$environment2$resolution' not found in data dictionary!
 Did you mean: '$data$transfer$environment1$resolution'? 

Then, when I try to save rmm as a .csv using `rmmToCSV(cleanRmm, "LeopardCatMetadata.csv")' I get this error:

Error in x[[i]][[j]][[k]] : subscript out of bounds
@hannahlowens
Copy link
Collaborator Author

Subscript out of bounds was my bad. rmmToCSV() is fine. The problem remains with rmmCheckFinalize(). Working through that now.

@hannahlowens
Copy link
Collaborator Author

hannahlowens commented Jul 18, 2024

All functions wrapped in rmmCheckFinalize() now work. However, the problem remains that if there is more than one transfer region, you will get:

Element name '$data$transfer$environment2$resolution' not found in data dictionary!
 Did you mean: '$data$transfer$environment1$resolution'? 

The clunky way to do this would be to add a ton of lines to the data dictionary, but that doesn't seem practical for long-term use. It's possible there's some way to fix this with a more consistent pattern matching algorithm, but nothing comes to mind right now.

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

No branches or pull requests

1 participant