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

minor modification in function spatPomp to allow input data.frame in tibble format #19

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

Koohoko
Copy link
Contributor

@Koohoko Koohoko commented Nov 4, 2023

Hi developpers,

I have made 3 minor modifications in the code of spatPomp constructor, to allow input in tidyverse tibble format. Without these changes, the spread function here (

pomp_data <- pomp_data %>% tidyr::spread(key = .data$obsname, value = .data$val)
) will not work (and results in error) because the ui column were all NAs from the previous step (
pomp_data <- data %>% dplyr::mutate(ui = tmp[match(data[,unitname], names(tmp))])
).

This fix is simple and seems unlikely to affect other functionalities. I hope you could considering including this to the package as I guess many users may use the tidyverse toolkit while preprocessing.

Best,
Haogao

Copy link
Collaborator

@ionides ionides left a comment

Choose a reason for hiding this comment

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

Thanks for the edits!
Ed

@ionides ionides merged commit 51ec228 into kidusasfaw:master Nov 5, 2023
6 checks passed
@ionides
Copy link
Collaborator

ionides commented Nov 5, 2023 via email

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.

2 participants