1
# These compat methods are for dplyr < 1.0.0.
2
# They are conditionally registered in `zzz.R` if an old version of dplyr is
3
# being used. Otherwise the methods in `compat-dplyr.R` are registered.
4
# Eventually these should be deprecated and dplyr 1.0.0 should be required.
5
# Only verbs that were previously supported in rsample are continually
6
# supported now. This means that there is more complete support when a user
7
# upgrades to dplyr >= 1.0.0. When support for dplyr < 1.0.0 is deprecated,
8
# move the tests in `compact-dplyr-old.R` to `compat-dplyr.R`. The methods
9
# are named with underscores between the generic and the class, not with dots,
10
# because when working interactively with `load_all()`, just having
11
# a function named `mutate.rset` will register a dplyr method internally in
12
# the package, even if you are on dplyr 1.0.0, which is highly confusing and
13
# undesirable. So we work around that by naming them in such a way that they
14
# are not picked up by S3 registration, and then we manually register them
15
# with the `method` argument of `s3_register()`.
16

17
dplyr_pre_1.0.0 <- function() {
18 1
  utils::packageVersion("dplyr") <= "0.8.5"
19
}
20

21
# Registered in `.onLoad()`
22
mutate_rset <- function(.data, ...) {
23 0
  out <- NextMethod()
24 0
  rset_reconstruct(out, .data)
25
}
26

27
# Registered in `.onLoad()`
28
arrange_rset <- function(.data, ...) {
29 0
  out <- NextMethod()
30 0
  rset_reconstruct(out, .data)
31
}
32

33
# Registered in `.onLoad()`
34
filter_rset <- function(.data, ...) {
35 0
  out <- NextMethod()
36 0
  rset_reconstruct(out, .data)
37
}
38

39
# Registered in `.onLoad()`
40
rename_rset <- function(.data, ...) {
41 0
  out <- NextMethod()
42 0
  rset_reconstruct(out, .data)
43
}
44

45
# Registered in `.onLoad()`
46
select_rset <- function(.data, ...) {
47 0
  out <- NextMethod()
48 0
  rset_reconstruct(out, .data)
49
}
50

51
# Registered in `.onLoad()`
52
slice_rset <- function(.data, ...) {
53 0
  out <- NextMethod()
54 0
  rset_reconstruct(out, .data)
55
}

Read our documentation on viewing source code .

Loading