Skip to content

Commit

Permalink
remove extra backticks
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHWade committed Aug 15, 2024
1 parent f47b9df commit 635ff72
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/rsplit.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rsplit <- function(data, in_id, out_id) {
if (!is.data.frame(data) & !is.matrix(data)) {
cli_abort("{.arg `data`} must be a data frame.")
cli_abort("{.arg data} must be a data frame.")
}

if (!is.integer(in_id) | any(in_id < 1)) {
Expand Down
30 changes: 30 additions & 0 deletions tests/testthat/_snaps/permutations.new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# no assessment set

Code
assessment(xx$splits[[1]])
Condition
Error in `as.data.frame()`:
! There is no assessment data set for an `rsplit` object with class perm_split.

# printing

Code
permutations(mtcars, 1)
Output
# Permutation sampling
# Permuted columns: [mpg]
# A tibble: 25 x 2
splits id
<list> <chr>
1 <split [32/0]> Permutations01
2 <split [32/0]> Permutations02
3 <split [32/0]> Permutations03
4 <split [32/0]> Permutations04
5 <split [32/0]> Permutations05
6 <split [32/0]> Permutations06
7 <split [32/0]> Permutations07
8 <split [32/0]> Permutations08
9 <split [32/0]> Permutations09
10 <split [32/0]> Permutations10
# i 15 more rows

0 comments on commit 635ff72

Please sign in to comment.