-
Notifications
You must be signed in to change notification settings - Fork 105
Make sure all sparse data errors look nice #1174
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
Conversation
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.
Leaving review as comment just to give us a chance to discuss the guidance to use fit_xy()
before merging. Looks awesome. :)
@@ -1,5 +1,5 @@ | |||
to_sparse_data_frame <- function(x, object) { | |||
if (methods::is(x, "sparseMatrix")) { |
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.
Digging this refactor. :)
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.
Kickass. Thanks for hearing me out on that fit()
happy path. Sparsnip!!!
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. |
Ref: #1125
This PR does two things.
First it adds an error if you try to use a sparse matrix with
fit()
, that redirects the user to usefit_xy()
.Second, it passes the
call
argument throughto_sparse_data_frame()
for nicer errors.