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
Bugfix tidy.Mclust()
for one-dimensional models. Fixes #489
#490
Conversation
For one-dimensional models, return the mean for each component in one column. For one-dimensional models, the previous code was returning the mean of each component in different columns, and all of them reported in the row corresponding to the last component, while the values for the other rows were filled filled with NAs. Now, if the model is one-dimensional, the mean for each component is stored in a column vector, which is added to the final table `ret` as a new column named `mean`.
Thank you for this! I need to update the |
The |
The case of giving a one-dimensional vector to `Mclust()` was missing.
The previous fix was leading to an error if we only asked for one component when calling `Mclust()`.
`augment.Mclust()` gives an error if the data stored in the object returned by `Mclust()` is a vector.
Hi. Sorry for the delayed response. I've added a couple of tests to check the correct behaviour when the input to However, if the input data to |
What about inspecting the |
I finished this up in #630. I tried to just push the commits to this PR but my git-fu wasn't good enough, apologies. |
Thanks a lot! |
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
For one-dimensional models, return the mean for each component in one column.
The previous code was returning the mean of each component in different columns, and all of them reported in the row corresponding to the last component, while the values for the other rows were filled filled with NAs.
Now, if the model is one-dimensional, the mean for each component is stored in a column vector, which is added to the final table
ret
as a new column namedmean
.