File: compat-vctrs.R

package info (click to toggle)
r-cran-rsample 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,932 kB
  • sloc: sh: 13; makefile: 2
file content (128 lines) | stat: -rw-r--r-- 2,265 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#' @import vctrs
NULL

# ------------------------------------------------------------------------------

stop_incompatible_cast_rset <- function(x, to, ..., x_arg, to_arg) {
  details <- "Can't cast to an rset because attributes are likely incompatible."
  stop_incompatible_cast(x, to, x_arg = x_arg, to_arg = to_arg, details = details)
}

stop_never_called <- function(fn) {
  rlang::abort(paste0("Internal error: `", fn, "()` should never be called."))
}

#' @export
vec_ptype_abbr.initial_split <- function(x, ...) {
  "i_splt"
}

#' @export
vec_ptype_abbr.initial_time_split <- function(x, ...) {
  "i_t_splt"
}

#' @export
vec_ptype_abbr.group_initial_split <- function(x, ...) {
  "g_i_splt"
}

#' @export
vec_ptype_abbr.initial_validation_split <- function(x, ...) {
  "i_v_splt"
}

#' @export
vec_ptype_abbr.group_initial_validation_split <- function(x, ...) {
  "giv_splt"
}

#' @export
vec_ptype_abbr.validation_set <- function(x, ...) {
  "v_set"
}

#' @export
vec_ptype_abbr.validation_split <- function(x, ...) {
  "v_splt"
}

#' @export
vec_ptype_abbr.validation_time_split <- function(x, ...) {
  "v_t_splt"
}

#' @export
vec_ptype_abbr.group_validation_split <- function(x, ...) {
  "g_v_splt"
}

#' @export
vec_ptype_abbr.bootstraps <- function(x, ...) {
  "boot"
}

#' @export
vec_ptype_abbr.group_bootstraps <- function(x, ...) {
  "g_boot"
}

#' @export
vec_ptype_abbr.vfold_cv <- function(x, ...) {
  "vfold"
}

#' @export
vec_ptype_abbr.group_vfold_cv <- function(x, ...) {
  "g_vfold"
}

#' @export
vec_ptype_abbr.group_mc_cv <- function(x, ...) {
  "g_mc_cv"
}

#' @export
vec_ptype_abbr.clustering_cv <- function(x, ...) {
  "clt_fold"
}

#' @export
vec_ptype_abbr.rolling_origin <- function(x, ...) {
  "roll_ori"
}

#' @export
vec_ptype_abbr.sliding_window <- function(x, ...) {
  "slide_w"
}

#' @export
vec_ptype_abbr.sliding_index <- function(x, ...) {
  "slide_i"
}

#' @export
vec_ptype_abbr.sliding_period <- function(x, ...) {
  "slide_p"
}

#' @export
vec_ptype_abbr.nested_cv <- function(x, ...) {
  "nest_cv"
}

#' @export
vec_ptype_abbr.apparent <- function(x, ...) {
  "appr"
}

#' @export
vec_ptype_abbr.manual_rset <- function(x, ...) {
  "m_rset"
}

#' @export
vec_ptype_abbr.permutations <- function(x, ...) {
  "perm"
}