We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_syntactic_literal()
1 parent 3c42193 commit e73247aCopy full SHA for e73247a
R/quasi-label.R
@@ -90,22 +90,17 @@ auto_label <- function(expr, value) {
90
}
91
92
can_inline <- function(x) {
93
- if (is.null(x)) {
94
- return(TRUE)
95
- }
96
- if (!is.atomic(x) || !is.vector(x)) {
+ if (!is_syntactic_literal(x)) {
97
return(FALSE)
98
99
- if (length(x) != 1) {
+ if (!is.null(dim(x))) {
100
101
102
103
if (is.character(x)) {
104
is.na(x) || (!grepl("\n", x) && nchar(x) < 100)
105
- } else if (is.logical(x) || is.numeric(x)) {
106
- TRUE
107
} else {
108
- FALSE
+ TRUE
109
110
111
0 commit comments