forked from tidyverse/purrr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpredicates.R
102 lines (74 loc) · 1.57 KB
/
predicates.R
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
#' Test is an object is integer or double
#'
#' Numeric is used in three different ways in base R:
#' * as an alias for double (as in [as.numeric()])
#' * to mean either integer or double (as in [mode()])
#' * for something representable as numeric (as in [as.numeric()])
#' This function tests for the second, which is often not what you want
#' so these functions are deprecated.
#'
#' @export
#' @keywords internal
is_numeric <- function(x) {
warning("Deprecated", call. = FALSE)
is_integer(x) || is_double(x)
}
#' @export
#' @rdname is_numeric
is_scalar_numeric <- function(x) {
warning("Deprecated", call. = FALSE)
is_scalar_integer(x) || is_scalar_double(x)
}
# Re-exports from purrr ---------------------------------------------------
#' @export
rlang::is_bare_list
#' @export
rlang::is_bare_atomic
#' @export
rlang::is_bare_vector
#' @export
rlang::is_bare_double
#' @export
rlang::is_bare_integer
#' @export
rlang::is_bare_numeric
#' @export
rlang::is_bare_character
#' @export
rlang::is_bare_logical
#' @export
rlang::is_list
#' @export
rlang::is_atomic
#' @export
rlang::is_vector
#' @export
rlang::is_integer
#' @export
rlang::is_double
#' @export
rlang::is_character
#' @export
rlang::is_logical
#' @export
rlang::is_null
#' @export
rlang::is_function
#' @export
rlang::is_scalar_list
#' @export
rlang::is_scalar_atomic
#' @export
rlang::is_scalar_vector
#' @export
rlang::is_scalar_double
#' @export
rlang::is_scalar_character
#' @export
rlang::is_scalar_logical
#' @export
rlang::is_scalar_integer
#' @export
rlang::is_empty
#' @export
rlang::is_formula