If you are filing a bug, make sure these boxes are checked before submitting your issue— thank you!
update.packages(oldPkgs="rsample", ask=FALSE)
sessionInfo()
and add the results to the issue. Even better would be to use the sessioninfo
package's session_info()
. Please read this page: reprex = {repr}oducible {ex}ample
Text and example code modified from the R FAQ on stackoverflow
If you are not using a data set in a package then use e.g. dput()
to give us something that can be put in R immediately, e.g.
dput(head(iris,4))
Without a dataset, there usually isn't much that we can do to help.
If your data frame has a factor with many levels, the dput
output can be unwieldy because it will still list all the possible factor levels even if they aren't present in the the subset of your data. To solve this issue, you can use the droplevels()
function. Notice below how species is a factor with only one level: dput(droplevels(head(iris, 4)))
.
library(rsample)
# Set the seed before using random numbers
set.seed(4121)
cv <- tidy(vfold_cv(mtcars, v = 5))
sessionInfo()
# or sessioninfo::session_info()
Be sure to test your chunks of code in an empty R session before submitting your issue!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.