diff --git a/R/db-interface.R b/R/db-interface.R index ca0dfa500..c26727ebc 100644 --- a/R/db-interface.R +++ b/R/db-interface.R @@ -121,7 +121,7 @@ copy_dm_to <- function( check_not_zoomed(dm) - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, "copy_dm_to") dest <- src_from_src_or_con(dest) src_names <- src_tbls_impl(dm) diff --git a/R/descriptions.R b/R/descriptions.R index f470bda50..072a9b22b 100644 --- a/R/descriptions.R +++ b/R/descriptions.R @@ -45,7 +45,7 @@ dm_set_table_description <- function(dm, ...) { check_not_zoomed(dm) - check_suggested("labelled", use = TRUE, version = "2.12.0") + check_suggested("labelled", use = TRUE, "dm_set_table_description", version = "2.12.0") def <- dm_get_def(dm, quiet = TRUE) selected <- eval_select_indices(quo(c(...)), src_tbls_impl(dm)) @@ -77,7 +77,7 @@ dm_get_table_description <- function(dm, table = NULL, ...) { check_dots_empty() check_not_zoomed(dm) - check_suggested("labelled", use = TRUE, version = "2.12.0") + check_suggested("labelled", use = TRUE, "dm_get_table_description", version = "2.12.0") table_expr <- enexpr(table) %||% src_tbls_impl(dm, quiet = TRUE) tables <- eval_select_indices(table_expr, set_names(src_tbls_impl(dm, quiet = TRUE))) @@ -115,7 +115,7 @@ dm_reset_table_description <- function(dm, table = NULL, ...) { check_dots_empty() check_not_zoomed(dm) - check_suggested("labelled", use = TRUE, version = "2.12.0") + check_suggested("labelled", use = TRUE, "dm_reset_table_description", version = "2.12.0") table_expr <- enexpr(table) %||% src_tbls_impl(dm, quiet = TRUE) def <- dm_get_def(dm, quiet = TRUE) diff --git a/R/dm_from_con.R b/R/dm_from_con.R index e592a2335..bec9e0cb4 100644 --- a/R/dm_from_con.R +++ b/R/dm_from_con.R @@ -55,7 +55,7 @@ dm_from_con <- function( ...) { stopifnot(is(con, "DBIConnection") || inherits(con, "Pool")) - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, "dm_from_con") if (inherits(con, "Pool")) { con <- pool_con <- pool::poolCheckout(con) diff --git a/R/dm_gui.R b/R/dm_gui.R index a08b8c4c7..8f3a79ff1 100644 --- a/R/dm_gui.R +++ b/R/dm_gui.R @@ -30,14 +30,20 @@ dm_gui <- function(..., dm = NULL, select_tables = TRUE, debug = FALSE) { check_dots_empty() - check_suggested("colourpicker", use = TRUE) - check_suggested("htmltools", use = TRUE) - check_suggested("htmlwidgets", use = TRUE) - check_suggested("reactable", use = TRUE) - check_suggested("rstudioapi", use = TRUE) - check_suggested("shiny", use = TRUE) - check_suggested("shinyAce", use = TRUE) - check_suggested("shinydashboard", use = TRUE) + check_suggested( + c( + "colourpicker", + "htmltools", + "htmlwidgets", + "reactable", + "rstudioapi", + "shiny", + "shinyAce", + "shinydashboard" + ), + use = TRUE, + top_level_fun = "dm_gui" + ) dm <- dm_ptype(dm) diff --git a/R/dm_sql.R b/R/dm_sql.R index f26e5fec6..dfc749ad6 100644 --- a/R/dm_sql.R +++ b/R/dm_sql.R @@ -42,7 +42,7 @@ dm_sql <- function( table_names = NULL, temporary = TRUE) { # - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, top_level_fun = "dm_sql") table_names <- ddl_check_table_names(table_names, dm) @@ -101,7 +101,7 @@ dm_ddl_pre <- function( table_names = NULL, temporary = TRUE) { # - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, "dm_ddl_pre") table_names <- ddl_check_table_names(table_names, dm) @@ -191,7 +191,7 @@ dm_dml_load <- function( table_names = NULL, temporary = TRUE) { # - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, "dm_dml_load") table_names <- ddl_check_table_names(table_names, dm) @@ -218,7 +218,7 @@ dm_ddl_post <- function( table_names = NULL, temporary = TRUE) { # - check_suggested("dbplyr", use = TRUE) + check_suggested("dbplyr", use = TRUE, "dm_ddl_post") table_names <- ddl_check_table_names(table_names, dm) diff --git a/R/nycflights13.R b/R/nycflights13.R index b36a01986..9b7b2b6f0 100644 --- a/R/nycflights13.R +++ b/R/nycflights13.R @@ -42,7 +42,7 @@ dm_nycflights13 <- function(..., cycle = FALSE, color = TRUE, subset = TRUE, com airports <- data$airports planes <- data$planes } else { - check_suggested("nycflights13", use = TRUE) + check_suggested("nycflights13", use = TRUE, top_level_fun = "dm_nycflights13") flights <- nycflights13::flights weather <- nycflights13::weather