File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -342,19 +342,17 @@ is_unique <- function(x) vec_unique_count(x) == 1L
342
342
343
343
# Check inputs with tibble but allow column vectors (see #2609 and #2374)
344
344
as_gg_data_frame <- function (x ) {
345
- x <- lapply(x , validate_column_vec )
345
+ x <- lapply(x , drop_column_vec )
346
346
data_frame0(!!! x )
347
347
}
348
- validate_column_vec <- function (x ) {
349
- if (is_column_vec(x )) {
348
+
349
+ drop_column_vec <- function (x ) {
350
+ dims <- dim(x )
351
+ if (length(dims ) == 2L && dims [[2 ]] == 1L ) {
350
352
dim(x ) <- NULL
351
353
}
352
354
x
353
355
}
354
- is_column_vec <- function (x ) {
355
- dims <- dim(x )
356
- length(dims ) == 2L && dims [[2 ]] == 1L
357
- }
358
356
359
357
# Parse takes a vector of n lines and returns m expressions.
360
358
# See https://github.com/tidyverse/ggplot2/issues/2864 for discussion.
You can’t perform that action at this time.
0 commit comments