From 2ccd3369527ef8d2cff649e706dc5a99dad7a017 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Thu, 5 Sep 2024 08:50:01 -0500 Subject: [PATCH] reduce overhead of `to_sparse_data_frame()` --- R/sparsevctrs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/sparsevctrs.R b/R/sparsevctrs.R index d09416ba3..9b1452ad2 100644 --- a/R/sparsevctrs.R +++ b/R/sparsevctrs.R @@ -18,7 +18,7 @@ is_sparse_tibble <- function(x) { } materialize_sparse_tibble <- function(x, object, input) { - if ((!allow_sparse(object)) && is_sparse_tibble(x)) { + if (is_sparse_tibble(x) && (!allow_sparse(object))) { cli::cli_warn( "{.arg {input}} is a sparse tibble, but {.fn {class(object)[1]}} with engine {.code {object$engine}} doesn't accept that. Converting to