-
Notifications
You must be signed in to change notification settings - Fork 303
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
tidy.prcomp()
returns incorrect result with method = "rotation"
#923
Comments
I suspect a fix would be to write broom/R/stats-prcomp-tidiers.R Line 126 in 5da04f6
Though that assumes a specific behavior of |
Thanks! Will there be another broom release his fall? I'm hoping to use this feature in a class I'll be teaching next spring. |
I'm hoping to wrap up patches from 0.7.0 in the next week or two and then will move towards revdepchecks! I'm hesitant to give any explicit timeline, as I've only had one go through the broom release process, but a fall release is definitely the goal. :-) |
This issue 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. |
When using
tidy()
on aprcomp
object withmethod = "rotation"
to extract the rotation matrix, the output that is returned is incorrect. The problem is that the PCs are numbered incorrectly. We would expect each variable in the original dataset to be paired exactly once with each PC. Instead, the first variable is paired multiple times with the first PC, the second variable is paired multiple times with the second PC, and so on. Reprex follows below.Created on 2020-09-03 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: