kidusasfaw / spatPomp

R package for statistical inference of spatiotemporal partially observed Markov processes
GNU General Public License v3.0
11 stars 10 forks source link

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

Closed Koohoko closed 1 year ago

Koohoko commented 1 year ago

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 (https://github.com/kidusasfaw/spatPomp/blob/650079052cb5dc6236d023cfe6179b162266d33f/R/spatPomp.R#L221) will not work (and results in error) because the ui column were all NAs from the previous step (https://github.com/kidusasfaw/spatPomp/blob/650079052cb5dc6236d023cfe6179b162266d33f/R/spatPomp.R#L218).

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

ionides commented 1 year ago

Hi Haogao, Thanks for this. I've pulled it into the spatPomp git repo and it will appear in due course on the CRAN version. Best, Ed.

Edward L. Ionides Associate Chair for Undergraduate Studies and Professor, Department of Statistics, University of Michigan 1085 South University, Ann Arbor, MI 48109-1107 email: @.*** phone: 734 615 3332 office: 453 West Hall

On Sat, Nov 4, 2023 at 10:18 AM Haogao Gu @.***> wrote:

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 ( https://github.com/kidusasfaw/spatPomp/blob/650079052cb5dc6236d023cfe6179b162266d33f/R/spatPomp.R#L221C6-L221C6) will not work (and results in error) because the ui column were all NAs from the previous step ( https://github.com/kidusasfaw/spatPomp/blob/650079052cb5dc6236d023cfe6179b162266d33f/R/spatPomp.R#L218 ).

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

You can view, comment on, or merge this pull request online at:

https://github.com/kidusasfaw/spatPomp/pull/19 Commit Summary

File Changes

(1 file https://github.com/kidusasfaw/spatPomp/pull/19/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/kidusasfaw/spatPomp/pull/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKAFT6SAROYKOQGIMGFFTLYCZFERAVCNFSM6AAAAAA65TQ4H6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TOMZWGMYDKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>