-
Notifications
You must be signed in to change notification settings - Fork 56
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
Correlate is incorrect with numeric vectors as x,y #120
Comments
As a side effect, correlate() now works with numeric vectors and one-column dfs. Close tidymodels#120. Close tidymodels#121.
Yes, this is something that needs to be resolved. I will submit a PR when there is a decision. The original package author commented here on the usage of the I agree that the use of |
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. |
Problem
correlate
does not work at all when x and y are numeric vectors.I am assuming it should work because the doc for correlate says:
However, I realise more and more that the whole package pretty much assumes x is a data.frame. Maybe the doc should be updated to reflect that
x
should be a data.frame and remove the now uselessy
argument? It is ok if correlate only works with data.frames and is not a drop-in replacement forcor
in all situations. It would be much clearer IMO.Reproducible example
A simple correlation between 2 vectors returns a 1x1 correlation matrix, with a single element which happens to be diagonal.
The correlation will take the value of the
diagonal
argument.You won't be able to reproduce yet due to #119 (which I fixed in my fork) but you get the gist:
Created on 2020-10-28 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: