-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
augment.mvgam
tidying method added
#88
Conversation
A few notes:
I just did what seemed sensible to me. In any case, I'll need to actually write some more documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this @swpease. Overall this looks great but there is one small issue that needs a bit of work: mvgam can handle data that are in a list
rather than a dataframe
, so the obs_data
slot may be in list
format as well (see mvgam:::mvgam_example5$obs_data
for an example of this). Would you mind editing augment.mvgam
to handle list observations? Unfortunately this will mean that the output will also be a list
in those special cases, but I think that is fine for now
It looks like
, but do you explicitly want a list returned if the data was input as a list? Maybe there's some edge case I'm missing. I see also that the covariates can be a matrix, which
This isn't the first time I've wished R was statically typed |
Thanks @swpease. I think in general it would be better if a |
Implemented an `augment` method for mvgam objects, one of the "tidying" methods. Largely diverged from the set of recommendations in [generics](https://web.archive.org/web/20240520145739/https://www.tidymodels.org/learn/develop/broom/#implementing-the-augment-method).
Alright, method operates on lists. I'm not sure what would be useful tests, so I've got a couple simple ones. Can't think of anything that doesn't seem brittle and unhelpful. Also, unsurprisingly I messed up my git workflow, so I kinda want to just make a new branch with a single commit and copy over the changes. |
Excellent thanks @swpease. I've merged this now and added you as a contributor to the DESCRIPTION. Please check and let me know if more details should be added (i.e. ORCID id or email address). I really appreciate the help! Will need to think about adding |
Here's my shiny new ORCID ID: 0009-0006-8977-9285 I had initially looked at implementing |
Thanks @swpease. Yes completely agree, that function in particular needs a major overhaul first. I've added your ORCID now, really appreciate the help |
Implemented an
augment
method for mvgam objects, one of the "tidying" methods. Largely diverged from the set of recommendations in generics.