From 6c12536aae2774dd192ccf5d08866d5cb2c58d47 Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Wed, 3 Feb 2021 18:52:03 +0000 Subject: [PATCH 1/6] change default position for added classes --- R/apparent.R | 3 +-- R/misc.R | 2 +- R/nest.R | 2 +- R/rset.R | 2 +- tests/testthat/test_initial.R | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/R/apparent.R b/R/apparent.R index e5481b32..192a5178 100644 --- a/R/apparent.R +++ b/R/apparent.R @@ -24,8 +24,7 @@ apparent <- function(data, ...) { split_objs <- add_class(split_objs, - cls = c("apparent", "rset"), - at_end = FALSE) + cls = c("apparent", "rset")) split_objs } diff --git a/R/misc.R b/R/misc.R index 699f18ed..72d5aebd 100644 --- a/R/misc.R +++ b/R/misc.R @@ -33,7 +33,7 @@ names0 <- function(num, prefix = "x") { paste0(prefix, ind) } -add_class <- function(x, cls, at_end = TRUE) { +add_class <- function(x, cls, at_end = FALSE) { class(x) <- if (at_end) c(class(x), cls) else diff --git a/R/nest.R b/R/nest.R index 94d13ab6..2616d777 100644 --- a/R/nest.R +++ b/R/nest.R @@ -79,7 +79,7 @@ nested_cv <- function(data, outside, inside) { out <- dplyr::mutate(outside, inner_resamples = inside) - out <- add_class(out, cls = "nested_cv", at_end = FALSE) + out <- add_class(out, cls = "nested_cv") attr(out, "outside") <- cl$outside attr(out, "inside") <- cl$inside diff --git a/R/rset.R b/R/rset.R index 19abb474..a44ec4a9 100644 --- a/R/rset.R +++ b/R/rset.R @@ -71,7 +71,7 @@ new_rset <- function(splits, ids, attrib = NULL, } if (length(subclass) > 0) { - res <- add_class(res, cls = subclass, at_end = FALSE) + res <- add_class(res, cls = subclass) } fingerprint <- rlang::hash(res) diff --git a/tests/testthat/test_initial.R b/tests/testthat/test_initial.R index 79144a10..5f47600a 100644 --- a/tests/testthat/test_initial.R +++ b/tests/testthat/test_initial.R @@ -9,7 +9,7 @@ dat1 <- data.frame(a = 1:20, b = letters[1:20]) test_that('default param', { set.seed(11) rs1 <- initial_split(dat1) - expect_equal(class(rs1), c("rsplit", "mc_split")) + expect_equal(class(rs1), c("mc_split", "rsplit")) tr1 <- training(rs1) ts1 <- testing(rs1) expect_equal(nrow(tr1), nrow(dat1)*3/4) From cd7a2e80c533aac57a6231d43b20949f6db0288f Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Wed, 3 Feb 2021 18:55:58 +0000 Subject: [PATCH 2/6] simplified the definition of various methods for the `complement()` generic and added a `.default` method --- NAMESPACE | 10 ++-------- NEWS.md | 2 ++ R/complement.R | 37 +++++++++++++++--------------------- man/complement.Rd | 34 +++++++++++++++++++++++++++++++-- tests/testthat/test_rsplit.R | 7 ++++++- 5 files changed, 57 insertions(+), 33 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 42b3a661..4bff7c51 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,17 +7,12 @@ S3method(.get_fingerprint,rset) S3method(as.data.frame,rsplit) S3method(as.integer,rsplit) S3method(complement,apparent_split) -S3method(complement,boot_split) -S3method(complement,group_vfold_split) -S3method(complement,loo_split) -S3method(complement,mc_split) -S3method(complement,perm_split) +S3method(complement,default) S3method(complement,rof_split) +S3method(complement,rsplit) S3method(complement,sliding_index_split) S3method(complement,sliding_period_split) S3method(complement,sliding_window_split) -S3method(complement,val_split) -S3method(complement,vfold_split) S3method(dim,rsplit) S3method(gather,rset) S3method(labels,rset) @@ -257,7 +252,6 @@ export(reg_intervals) export(rolling_origin) export(rsample2caret) export(rset_reconstruct) -export(rsplit_complement) export(sliding_index) export(sliding_period) export(sliding_window) diff --git a/NEWS.md b/NEWS.md index 26115bac..7611aa4d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ * A few internal functions were exported so that `rsample`-adjacent packages can use the same underlying code. +* Changed the inheritance structure for `rsplit` objects from specific to general and simplified the methods for the `complement()` generic. + # rsample 0.0.8 diff --git a/R/complement.R b/R/complement.R index 33be164b..d1ca8ce0 100644 --- a/R/complement.R +++ b/R/complement.R @@ -5,14 +5,9 @@ #' #' Given an `rsplit` object, `complement()` will determine which #' of the data rows are contained in the assessment set. To save space, -#' many of the `rset` objects will not contain indices for the +#' many of the `rsplit` objects will not contain indices for the #' assessment split. #' -#' `rsplit_complement()` handles the determination for sets for most resampling -#' methods. Unless the row indices for the assessment set are already -#' determined, this function selects all of the rows that are not in the -#' analysis set and returns those as the assessment set. -#' #' @param x An `rsplit` object #' @param ... Not currently used #' @return A integer vector. @@ -29,41 +24,30 @@ complement <- function(x, ...) #' @export #' @rdname complement -rsplit_complement <- function(x, ...) { +complement.rsplit <- function(x, ...) { if (!is_missing_out_id(x)) { return(x$out_id) } else { (1:nrow(x$data))[-unique(x$in_id)] } } - -#' @export -complement.vfold_split <- rsplit_complement -#' @export -complement.mc_split <- rsplit_complement -#' @export -complement.val_split <- rsplit_complement -#' @export -complement.loo_split <- rsplit_complement -#' @export -complement.group_vfold_split <- rsplit_complement -#' @export -complement.boot_split <- rsplit_complement -#' @export -complement.perm_split <- rsplit_complement #' @export +#' @rdname complement complement.rof_split <- function(x, ...) { get_stored_out_id(x) } #' @export +#' @rdname complement complement.sliding_window_split <- function(x, ...) { get_stored_out_id(x) } #' @export +#' @rdname complement complement.sliding_index_split <- function(x, ...) { get_stored_out_id(x) } #' @export +#' @rdname complement complement.sliding_period_split <- function(x, ...) { get_stored_out_id(x) } @@ -83,6 +67,7 @@ get_stored_out_id <- function(x) { } #' @export +#' @rdname complement complement.apparent_split <- function(x, ...) { if (!is_missing_out_id(x)) { return(x$out_id) @@ -91,6 +76,14 @@ complement.apparent_split <- function(x, ...) { } } +#' @export +complement.default <- function(x, ...) { + cls <- paste0("'", class(x), "'", collapse = ", ") + rlang::abort( + paste("No `complement()` method for this class(es)", cls) + ) +} + #' Get the indices of the analysis set from the assessment set #' @param ind A vector of integers for which rows of data belong in the #' assessment set. diff --git a/man/complement.Rd b/man/complement.Rd index 9fee0813..9b31077e 100644 --- a/man/complement.Rd +++ b/man/complement.Rd @@ -2,12 +2,27 @@ % Please edit documentation in R/complement.R \name{complement} \alias{complement} -\alias{rsplit_complement} +\alias{complement.rsplit} +\alias{complement.rof_split} +\alias{complement.sliding_window_split} +\alias{complement.sliding_index_split} +\alias{complement.sliding_period_split} +\alias{complement.apparent_split} \title{Determine the Assessment Samples} \usage{ complement(x, ...) -rsplit_complement(x, ...) +\method{complement}{rsplit}(x, ...) + +\method{complement}{rof_split}(x, ...) + +\method{complement}{sliding_window_split}(x, ...) + +\method{complement}{sliding_index_split}(x, ...) + +\method{complement}{sliding_period_split}(x, ...) + +\method{complement}{apparent_split}(x, ...) } \arguments{ \item{x}{An \code{rsplit} object} @@ -20,6 +35,21 @@ A integer vector. \description{ This method and function help find which data belong in the analysis and assessment sets. + +#' @export +complement.vfold_split <- rsplit_complement +#' @export +complement.mc_split <- rsplit_complement +#' @export +complement.val_split <- rsplit_complement +#' @export +complement.loo_split <- rsplit_complement +#' @export +complement.group_vfold_split <- rsplit_complement +#' @export +complement.boot_split <- rsplit_complement +#' @export +complement.perm_split <- rsplit_complement } \details{ Given an \code{rsplit} object, \code{complement()} will determine which diff --git a/tests/testthat/test_rsplit.R b/tests/testthat/test_rsplit.R index 8df16d58..c6fdb0a6 100644 --- a/tests/testthat/test_rsplit.R +++ b/tests/testthat/test_rsplit.R @@ -53,7 +53,12 @@ test_that('print methods', { }) }) - +test_that("default complement method errors", { + expect_error( + complement("a string"), + "No `complement[(][)]` method for this class[(]es[)]" + ) +}) From 026e8725478c9aa0bb0b69becc1e1219e4e6d75d Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Wed, 3 Feb 2021 18:56:26 +0000 Subject: [PATCH 3/6] fixed string for error message --- R/misc.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/misc.R b/R/misc.R index 72d5aebd..9262271e 100644 --- a/R/misc.R +++ b/R/misc.R @@ -89,7 +89,7 @@ split_unnamed <- function(x, f) { #' @export #' @rdname get_fingerprint .get_fingerprint.default <- function(x, ...) { - cls <- paste("'", class(x), "'", sep = ", ") + cls <- paste0("'", class(x), "'", collapse = ", ") rlang::abort( paste("No `.get_fingerprint()` method for this class(es)", cls) ) From 37bb971e94ad0e0c989f3d486cf53bcd7fca055e Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Wed, 3 Feb 2021 19:06:50 +0000 Subject: [PATCH 4/6] results of the reverse dependency checks --- revdep/README.md | 101 +++++---- revdep/data.sqlite | Bin 24576 -> 49152 bytes revdep/failures.md | 496 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 557 insertions(+), 40 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index fa91bc70..7ceb3548 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -2,48 +2,71 @@ |field |value | |:--------|:----------------------------| -|version |R version 4.0.0 (2020-04-24) | -|os |macOS Mojave 10.14.6 | -|system |x86_64, darwin17.0 | -|ui |RStudio | -|language |(EN) | -|collate |en_US.UTF-8 | -|ctype |en_US.UTF-8 | -|tz |America/New_York | -|date |2020-06-03 | +|version |R version 4.0.3 (2020-10-10) | +|os |Ubuntu 18.04.5 LTS | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |en | +|collate |en_GB.UTF-8 | +|ctype |en_GB.UTF-8 | +|tz |Europe/London | +|date |2021-02-03 | # Dependencies -|package |old |new |Δ | -|:----------|:-------|:-------|:--| -|rsample |0.0.6 |0.0.7 |* | -|assertthat |0.2.1 |0.2.1 | | -|cli |2.0.2 |2.0.2 | | -|crayon |1.3.4 |1.3.4 | | -|digest |0.6.25 |0.6.25 | | -|dplyr |1.0.0 |1.0.0 | | -|ellipsis |0.3.1 |0.3.1 | | -|fansi |0.4.1 |0.4.1 | | -|furrr |0.1.0 |0.1.0 | | -|future |1.17.0 |1.17.0 | | -|generics |0.0.2 |0.0.2 | | -|globals |0.12.5 |0.12.5 | | -|glue |1.4.1 |1.4.1 | | -|lifecycle |0.2.0 |0.2.0 | | -|listenv |0.8.0 |0.8.0 | | -|magrittr |1.5 |1.5 | | -|pillar |1.4.4 |1.4.4 | | -|pkgconfig |2.0.3 |2.0.3 | | -|purrr |0.3.4 |0.3.4 | | -|R6 |2.4.1 |2.4.1 | | -|Rcpp |1.0.4.6 |1.0.4.6 | | -|rlang |0.4.6 |0.4.6 | | -|stringi |1.4.6 |1.4.6 | | -|tibble |3.0.1 |3.0.1 | | -|tidyr |1.1.0 |1.1.0 | | -|tidyselect |1.1.0 |1.1.0 | | -|utf8 |1.1.4 |1.1.4 | | -|vctrs |0.3.0 |0.3.0 | | +|package |old |new |Δ | +|:----------|:------|:----------|:--| +|rsample |0.0.8 |0.0.8.9001 |* | +|assertthat |0.2.1 |0.2.1 | | +|cli |2.3.0 |2.3.0 | | +|cpp11 |0.2.6 |0.2.6 | | +|crayon |1.4.0 |1.4.0 | | +|digest |0.6.27 |0.6.27 | | +|dplyr |1.0.4 |1.0.4 | | +|ellipsis |0.3.1 |0.3.1 | | +|fansi |0.4.2 |0.4.2 | | +|furrr |0.2.2 |0.2.2 | | +|future |1.21.0 |1.21.0 | | +|generics |0.1.0 |0.1.0 | | +|globals |0.14.0 |0.14.0 | | +|glue |1.4.2 |1.4.2 | | +|lifecycle |0.2.0 |0.2.0 | | +|listenv |0.8.0 |0.8.0 | | +|magrittr |2.0.1 |2.0.1 | | +|modeldata |0.1.0 |NA |* | +|parallelly |1.23.0 |1.23.0 | | +|pillar |1.4.7 |1.4.7 | | +|pkgconfig |2.0.3 |2.0.3 | | +|purrr |0.3.4 |0.3.4 | | +|R6 |2.5.0 |2.5.0 | | +|rlang |0.4.10 |0.4.10 | | +|slider |0.1.5 |0.1.5 | | +|tibble |3.0.6 |3.0.6 | | +|tidyr |1.1.2 |1.1.2 | | +|tidyselect |1.1.0 |1.1.0 | | +|utf8 |1.1.4 |1.1.4 | | +|vctrs |0.3.6 |0.3.6 | | +|warp |0.2.0 |0.2.0 | | # Revdeps +## Failed to check (15) + +|package |version |error |warning |note | +|:-------------|:-------|:-----|:-------|:----| +|baguette |? | | | | +|broom |? | | | | +|butcher |? | | | | +|embed |? | | | | +|MachineShop |? | | | | +|probably |? | | | | +|psfmi |? | | | | +|recipes |? | | | | +|solitude |? | | | | +|tfdatasets |? | | | | +|tidymodels |? | | | | +|tidyposterior |? | | | | +|tidyrules |? | | | | +|timetk |? | | | | +|tune |? | | | | + diff --git a/revdep/data.sqlite b/revdep/data.sqlite index 683642dedc56ecc35956a91538839d7626650264..529451dd0c65031f37e4cf2d112e1680a3433b10 100644 GIT binary patch literal 49152 zcmeHQOKcoRdL}gz^`JN{*`~QNtyPIeLQ2b->7MtDZN;=iIgBY%JEZMRmX6%h)8w?+ z(>?BoBzo7#auXy#E}NXP0kS}_mtcbhf*{Eu*;A53fFOqratp8svX=w_lD#B*2?FH% zs~^+D8B&tHwn@51BH2}4U0wD6_1EK{`o3EG^0MLSY}0l+s>cc=7e+=$M_yxWWMt$v ze$L}3`i$Y?WE8;P(ZuzBm$yfFmzQv8l&A@E$$!9-BMI*n8n)@3Hm8udL5gjO(eM?*Kj%| ze`K^C-E;H@ExqgB3m*)FC&Lmgt=wAt3LBD+t*)>zZB*22zdn89^wjk9=x2Jf$q45ZN)XAxQ=RA9)5JEFFL4W5Jk!OCzD}!8;f@r8;#Y* zJX=~>TVGgS4nyIecNQ8eODk{8v(+~tD*8NZ8(O6J;@9rWOP#Lmc<#$<{??Z6;$qpbwhe1*-5x)c znw)GJwzl4QYY}xEKaDUsh+4L#UreQ@rz1~~t9H7ke&s|;xf-}*xQin6x+qy0|7xf6&dN z|Jm)N$1hJzTzNKA_@*||b?hemb~~|K$B(cc%W;8PjmRnRn-B?B;!4^JeN_n{mAsJUeuc;t|pvCko*bjv{x9!kTKD z4s-n`3Zdz)%QjWR)LV6?*}mCgmhCa_gJSS?!L#SVWAxDQ+PGn5KF}ST?!pf^&)RT7 zX^!f)$*1ISkJPqdBCDBqKm2gFGjULTZL@W}>igaK^XD&3>66cXsqiw^ z|Bme#-UsZC>NHh&1Yha!a28HC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glAmcudeYPykk?> z`)vFY>6Jr}Fu}$V$pe~IztXeV z=!mHy%FX9Xl|n(uD|@sHv&|WXbhX`6wB) bed*vDM>;-6HU2`f#__p+gE~Gg@b>=)Ra1Ff delta 414 zcmY+Au};G<5QbBn1}JgtA|iyUs;U@ZVr5|I1`84rPvFE?YLV1Y>>zb&AA!=9jR}bb zI(6d#c$E&k0lu^gmOT95-Tn9LW-~JTZajA=_dGAy{>J?LvdO)RtKU!g#;C{E?1!z` zJ9}kn+2=QGen%IoH{g*^;*Ql)tFf^n%NDENbwHhq$2Wb?UqS1id@1~;KUhaooT8kZ z#8%~CA5n5fdQQqoS!H0597W`;CWST@N~KGrZA$tz&9#KAZfu8$hEiBzz}AQzkZx>r zrfekv$HEplj*YScO{O~9C!M&2R27?D;hrlOW|%8%X1i{>D0L!|Y=Yo0AgA%INJnZ6 z_aj{(qfM7zJxMSr%FuTXkS8EfMa20hl}$%brw(^qH7T{uvD#$~w;&M@6Hq)$ diff --git a/revdep/failures.md b/revdep/failures.md index 9a207363..e663be6f 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -1 +1,495 @@ -*Wow, no problems at all. :)* \ No newline at end of file +# baguette + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# broom + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# butcher + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# embed + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# MachineShop + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# probably + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# psfmi + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# recipes + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# solitude + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# tfdatasets + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# tidymodels + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# tidyposterior + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# tidyrules + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# timetk + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# tune + +
+ +* Version: +* GitHub: https://github.com/tidymodels/rsample +* Source code: NA +* Number of recursive dependencies: 0 + +
+ +## Error before installation + +### Devel + +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` From 600813015ee8ee62dcaf247724dc4b345e717ecc Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Thu, 4 Feb 2021 10:49:36 +0000 Subject: [PATCH 5/6] update documentation --- man/complement.Rd | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/man/complement.Rd b/man/complement.Rd index 9b31077e..81a36607 100644 --- a/man/complement.Rd +++ b/man/complement.Rd @@ -35,32 +35,12 @@ A integer vector. \description{ This method and function help find which data belong in the analysis and assessment sets. - -#' @export -complement.vfold_split <- rsplit_complement -#' @export -complement.mc_split <- rsplit_complement -#' @export -complement.val_split <- rsplit_complement -#' @export -complement.loo_split <- rsplit_complement -#' @export -complement.group_vfold_split <- rsplit_complement -#' @export -complement.boot_split <- rsplit_complement -#' @export -complement.perm_split <- rsplit_complement } \details{ Given an \code{rsplit} object, \code{complement()} will determine which of the data rows are contained in the assessment set. To save space, -many of the \code{rset} objects will not contain indices for the +many of the \code{rsplit} objects will not contain indices for the assessment split. - -\code{rsplit_complement()} handles the determination for sets for most resampling -methods. Unless the row indices for the assessment set are already -determined, this function selects all of the rows that are not in the -analysis set and returns those as the assessment set. } \examples{ set.seed(28432) From 028a7e60ab833fed9804fadc2a4f22fd702023a6 Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Thu, 4 Feb 2021 10:50:07 +0000 Subject: [PATCH 6/6] un-export `default_complement()` --- NAMESPACE | 1 - R/complement.R | 8 +------- man/default_complement.Rd | 21 --------------------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 man/default_complement.Rd diff --git a/NAMESPACE b/NAMESPACE index 4bff7c51..e2efb2b0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -210,7 +210,6 @@ export(bootstraps) export(caret2rsample) export(complement) export(contains) -export(default_complement) export(ends_with) export(everything) export(form_pred) diff --git a/R/complement.R b/R/complement.R index d1ca8ce0..a3114543 100644 --- a/R/complement.R +++ b/R/complement.R @@ -84,13 +84,7 @@ complement.default <- function(x, ...) { ) } -#' Get the indices of the analysis set from the assessment set -#' @param ind A vector of integers for which rows of data belong in the -#' assessment set. -#' @param n A single integer for the total number of rows in the data set. -#' @return A named list of integer vectors. -#' @export -#' @keywords internal +# Get the indices of the analysis set from the assessment set default_complement <- function(ind, n) { list(analysis = setdiff(1:n, ind), assessment = unique(ind)) diff --git a/man/default_complement.Rd b/man/default_complement.Rd deleted file mode 100644 index 7f3a1a87..00000000 --- a/man/default_complement.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/complement.R -\name{default_complement} -\alias{default_complement} -\title{Get the indices of the analysis set from the assessment set} -\usage{ -default_complement(ind, n) -} -\arguments{ -\item{ind}{A vector of integers for which rows of data belong in the -assessment set.} - -\item{n}{A single integer for the total number of rows in the data set.} -} -\value{ -A named list of integer vectors. -} -\description{ -Get the indices of the analysis set from the assessment set -} -\keyword{internal}