tests/testthat/_snaps/error-helpers.md

output

Code
  abort_key_set_force_false("pk_table")
Condition
  Error in `abort_key_set_force_false()`:
  ! Table pk_table already has a primary key. Use `force = TRUE` to change the existing primary key.
Code
  abort_not_unique_key("Christmas", "Rudolph")
Condition
  Error in `abort_not_unique_key()`:
  ! (`Rudolph`) not a unique key of `Christmas`.
Code
  abort_not_unique_key("Christmas", c("elves", "Rudolph", "mulled_wine"))
Condition
  Error in `abort_not_unique_key()`:
  ! (`elves`, `Rudolph`, `mulled_wine`) not a unique key of `Christmas`.
Code
  abort_table_not_in_dm("laziness", "hard_work")
Condition
  Error in `abort_table_not_in_dm()`:
  ! Table laziness not in <dm> object. Available table names: hard_work.
Code
  abort_not_subset_of("playing", "game", "hunting", "game")
Condition
  Error in `abort_not_subset_of()`:
  ! Column (`game`) of table playing contains values (see examples above) that are not present in column (`game`) of table hunting.
Code
  abort_sets_not_equal(c("A problem occurred.",
    "And another, even worse problem, occurred shortly after."))
Condition
  Error in `abort_sets_not_equal()`:
  ! A problem occurred.
  And another, even worse problem, occurred shortly after.
Code
  abort_not_bijective("child_table_name", "fk_col_name")
Condition
  Error in `abort_not_bijective()`:
  ! 1..1 cardinality (bijectivity) is not given: Column (`fk_col_name`) in table child_table_name contains duplicate values.
Code
  abort_not_injective("child_table_name", "fk_col_name")
Condition
  Error in `abort_not_injective()`:
  ! 0..1 cardinality (injectivity from child table to parent table) is not given: Column (`fk_col_name`) in table child_table_name contains duplicate values.
Code
  abort_ref_tbl_has_no_pk("parent_table")
Condition
  Error in `abort_ref_tbl_has_no_pk()`:
  ! ref_table parent_table needs a primary key first. Use `dm_enum_pk_candidates()` to find appropriate columns and `dm_add_pk()` to define a primary key.
Code
  abort_is_not_fkc()
Condition
  Error in `abort_is_not_fkc()`:
  ! No foreign keys to remove.
Code
  abort_rm_fk_col_missing()
Condition
  Error in `abort_rm_fk_col_missing()`:
  ! Parameter `columns` has to be set. Pass NULL for removing all references.
Code
  abort_last_col_missing()
Condition
  Error in `abort_last_col_missing()`:
  ! The last color can't be missing.
Code
  abort_no_cycles(create_graph_from_dm(dm_for_filter_w_cycle()))
Condition
  Error in `abort_no_cycles()`:
  ! Cycles in the relationship graph not yet supported.
  i Shortest cycle: tf_5 -> tf_6 -> tf_7 -> tf_2 -> tf_3 -> tf_4 -> tf_5
Code
  abort_tables_not_reachable_from_start()
Condition
  Error in `abort_tables_not_reachable_from_start()`:
  ! All selected tables must be reachable from `.start`.
Code
  abort_dupl_new_id_col_name("tibbletable")
Condition
  Error in `abort_dupl_new_id_col_name()`:
  ! `new_id_column` can't have an identical name as one of the columns of tibbletable.
Code
  abort_no_overwrite()
Condition
  Error in `abort_no_overwrite()`:
  ! The `overwrite` argument is not supported.
Code
  abort_pk_not_defined()
Condition
  Error in `abort_pk_not_defined()`:
  ! No primary keys to remove.
Code
  abort_fk_exists("child", c("child_1", "child_2"), "parent")
Condition
  Error in `abort_fk_exists()`:
  ! (`child_1`, `child_2`) is already a foreign key of table child into table parent.
Code
  abort_first_rm_fks("parent", c("child_1", "child_2"))
Condition
  Error in `abort_first_rm_fks()`:
  ! There are foreign keys pointing from tables child_1 and child_2 to table parent. First remove those, or set `fail_fk = FALSE`.
Code
  abort_update_not_supported()
Condition
  Error in `abort_update_not_supported()`:
  ! Updating <dm> objects not supported.
Code
  abort_only_possible_wo_filters("find_wisdom")
Condition
  Error in `abort_only_possible_wo_filters()`:
  ! Not supported on a <dm> with filter conditions. Consider using `dm_apply_filters()` first.
Code
  abort_tables_not_neighbors("subjects", "king")
Condition
  Error in `abort_tables_not_neighbors()`:
  ! Tables subjects and king are not directly linked by a foreign key relation.
Code
  abort_only_parents("dm_flatten", "table", "recursive")
Condition
  Error in `abort_only_parents()`:
  ! All join partners of table `table` must be its direct neighbors. Use `recursive = TRUE` for recursive flattening.
Code
  abort_not_same_src()
Condition
  Error in `abort_not_same_src()`:
  ! Not all tables in the object share the same `src`.
Code
  abort_what_a_weird_object("monster")
Condition
  Error in `abort_what_a_weird_object()`:
  ! Don't know how to determine table source for object of class <monster>.
Code
  abort_not_same_src()
Condition
  Error in `abort_not_same_src()`:
  ! Not all tables in the object share the same `src`.
Code
  abort_squash_limited()
Condition
  Error in `abort_squash_limited()`:
  ! Recursive flattening only supports `left_join()`, `inner_join()`, or `full_join()`.
Code
  abort_apply_filters_first("join_tightly")
Condition
  Error in `abort_apply_filters_first()`:
  ! `dm_..._to_tbl()` with join using `join_tightly()` generally wouldn't produce the correct result when filters are set. Please consider calling `dm_apply_filters()` first.
Code
  abort_no_flatten_with_nest_join()
Condition
  Error in `abort_no_flatten_with_nest_join()`:
  ! `join = nest_join` is not supported. Consider `join = left_join`.
Code
  abort_is_not_dm("blob")
Condition
  Error in `abort_is_not_dm()`:
  ! Required class <dm> but instead is <blob>.
Code
  abort_con_only_for_dbi()
Condition
  Error in `abort_con_only_for_dbi()`:
  ! A local <dm> doesn't have a DB connection.
Code
  abort_only_possible_wo_zoom("dm_zoom_to")
Condition
  Error in `abort_only_possible_wo_zoom()`:
  ! Not supported on a <dm_zoomed>. Consider using one of `dm_update_zoomed()`, `dm_insert_zoomed()` or `dm_discard_zoomed()` first.
Code
  abort_only_possible_w_zoom("dm_update_zoomed")
Condition
  Error in `abort_only_possible_w_zoom()`:
  ! Not supported on an unzoomed <dm>. Consider using `dm_zoom_to()` first.
Code
  abort_learn_keys(error_cnd(message = "some reason"))
Condition
  Error in `abort_learn_keys()`:
  ! Failed to learn keys from database.
  i Use `learn_keys = FALSE` to work around, or `dm:::dm_meta()` to debug.
  Caused by error:
  ! some reason
Code
  abort_tbl_access("accessdenied")
Condition
  Error in `abort_tbl_access()`:
  ! Table accessdenied cannot be accessed.
  i Use `tbl(src, ...)` to troubleshoot.
Code
  abort_need_unique_names("clone")
Condition
  Error in `abort_need_unique_names()`:
  ! Each new table needs to have a unique name. Duplicate new name: clone.
Code
  abort_fk_not_tracked("hook", "eye")
Condition
  Error in `abort_fk_not_tracked()`:
  ! The foreign key that existed between the originally zoomed table hook and eye got lost in transformations. Please explicitly provide the `by` argument.
Code
  abort_dm_invalid("it's ugly.")
Condition
  Error in `abort_dm_invalid()`:
  ! This <dm> is invalid, reason: it's ugly.
Code
  abort_no_table_provided()
Condition
  Error in `abort_no_table_provided()`:
  ! Argument `table` is missing.
Code
  abort_table_not_zoomed("blur", c("focus_1", "focus_2"))
Condition
  Error in `abort_table_not_zoomed()`:
  ! Table `blur` not zoomed, zoomed tables: `focus_1` and `focus_2`.
Code
  abort_not_pulling_multiple_zoomed()
Condition
  Error in `abort_not_pulling_multiple_zoomed()`:
  ! If more than one zoomed table is available, you need to specify argument `table`.
Code
  abort_cols_not_avail(c("pink5", "elephant"))
Condition
  Error in `abort_cols_not_avail()`:
  ! The colors "pink5" and "elephant" are not available. Call `dm_get_available_colors()` for possible color names or use hex color codes.
Code
  abort_only_named_args("give_names", "frobnicability")
Condition
  Error in `abort_only_named_args()`:
  ! All `...` arguments must be named. The names represent frobnicability.
Code
  abort_wrong_syntax_set_cols()
Condition
  Error in `abort_wrong_syntax_set_cols()`:
  ! You seem to be using outdated syntax for setting colors, type `?dm_set_colors()` for examples.
Code
  abort_pk_not_tracked("house", "house_number")
Condition
  Error in `abort_pk_not_tracked()`:
  ! The primary key column(s) `house_number` of the originally zoomed table house got lost in transformations.
Code
  abort_only_for_local_src(mtcars)
Condition
  Error in `abort_only_for_local_src()`:
  ! Only supported for a local `src`, not on a database with `src`-class: <data.frame>.
Code
  abort_parameter_not_correct_class("number", correct_class = "numeric", class = "logical")
Condition
  Error in `abort_parameter_not_correct_class()`:
  ! Parameter `number` needs to be of class <numeric> but is of class <logical>.
Code
  abort_parameter_not_correct_length("length_1_parameter", 1, letters[1:26])
Condition
  Error in `abort_parameter_not_correct_length()`:
  ! Argument `length_1_parameter` needs to be of length 1 but is of length 26 ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", ..., "y", and "z").
Code
  warn_if_arg_not("NULL", c("MSSQL", "Postgres"), arg_name = "dbms_dependent_arg")
Condition
  Warning:
  Argument `dbms_dependent_arg` ignored: currently only supported for MSSQL and Postgres.
Output
  NULL
Code
  abort_no_schemas_supported("FantasticDatabaseManagementSystem",
    "hyperconnection")
Condition
  Error in `abort_no_schemas_supported()`:
  ! The concept of schemas is not supported for DBMS `FantasticDatabaseManagementSystem`.
Code
  abort_no_schemas_supported(con = 1)
Condition
  Error in `abort_no_schemas_supported()`:
  ! Currently schemas are not supported for a connection of class <numeric>.
Code
  abort_no_schemas_supported()
Condition
  Error in `abort_no_schemas_supported()`:
  ! Schemas are not available locally.
Code
  abort_temporary_not_in_schema()
Condition
  Error in `abort_temporary_not_in_schema()`:
  ! If argument `temporary` is TRUE, argument `schema` has to be NULL.
Code
  abort_one_of_schema_table_names()
Condition
  Error in `abort_one_of_schema_table_names()`:
  ! Only one of the arguments `schema` and `table_names` can be different from NULL.

singular and plural

Code
  abort_not_subset_of("t1", c("a", "b"), "t2", c("c", "d"))
Condition
  Error in `abort_not_subset_of()`:
  ! Columns (`a`, `b`) of table t1 contain values (see examples above) that are not present in columns (`c`, `d`) of table t2.
Code
  abort_not_bijective("child_tbl", c("col_a", "col_b"))
Condition
  Error in `abort_not_bijective()`:
  ! 1..1 cardinality (bijectivity) is not given: Columns (`col_a`, `col_b`) in table child_tbl contain duplicate values.
Code
  abort_not_injective("child_tbl", c("col_a", "col_b"))
Condition
  Error in `abort_not_injective()`:
  ! 0..1 cardinality (injectivity from child table to parent table) is not given: Columns (`col_a`, `col_b`) in table child_tbl contain duplicate values.
Code
  abort_need_unique_names(c("clone_a", "clone_b"))
Condition
  Error in `abort_need_unique_names()`:
  ! Each new table needs to have a unique name. Duplicate new names: clone_a and clone_b.
Code
  abort_first_rm_fks("parent", "child_1")
Condition
  Error in `abort_first_rm_fks()`:
  ! There is a foreign key pointing from table child_1 to table parent. First remove those, or set `fail_fk = FALSE`.
Code
  abort_tbl_access(c("table_a", "table_b"))
Condition
  Error in `abort_tbl_access()`:
  ! Tables table_a and table_b cannot be accessed.
  i Use `tbl(src, ...)` to troubleshoot.
Code
  abort_cols_not_avail("pink5")
Condition
  Error in `abort_cols_not_avail()`:
  ! The color "pink5" is not available. Call `dm_get_available_colors()` for possible color names or use hex color codes.
Code
  warn_tbl_access("table_a")
Condition
  Warning:
  Table table_a cannot be accessed.
  i Use `tbl(src, ...)` to troubleshoot.
  i Set the `table_name` argument to avoid this warning.
Code
  warn_tbl_access(c("table_a", "table_b"))
Condition
  Warning:
  Tables table_a and table_b cannot be accessed.
  i Use `tbl(src, ...)` to troubleshoot.
  i Set the `table_name` argument to avoid this warning.


Try the dm package in your browser

Any scripts or data that you put into this service are public.

dm documentation built on March 5, 2026, 9:07 a.m.