-
Notifications
You must be signed in to change notification settings - Fork 66
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
Function to create split
from dataframes
#246
Function to create split
from dataframes
#246
Conversation
res <- rsplit(data, ind$analysis, ind$assessment) | ||
if (!is.null(class)) | ||
res <- rsplit(data, ind$analysis, ind$assessment) | ||
if (!is.null(class)) { |
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.
Looks like this change was made by running styler
on the file.
@topepo Can you take a look at this, specifically the way I made I was really struggling with the naming for this function 😩 and how similar and confusing all these constructors are, and then I thought, "Wait, these should just be methods." Fortunately, the original function already had the list the first argument. |
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.
Looks great. I made a few small changes. The S3 method is a great idea.
Thanks so much for getting this started @liamblake! 🙌 |
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. |
A function
split_from_dataframe
to create arsplit
object from a training and testing dataframe, making it much easier to use your own data splits. Closes #241. I'm not sure ifmisc.R
is the best place for this function, but chose that file because it containsmake_splits
. Similarly, the new tests are intest-make-splits.R
.