assert_terms {admiral}R Documentation

Asserts Requirements for Terms for Queries

Description

The function checks the requirements for terms for queries provided by the user. The terms could have been provided directly in the query definition or via a user provided function for accessing a SMQ or SDG database.

Usage

assert_terms(
  terms,
  expect_query_name = FALSE,
  expect_query_id = FALSE,
  source_text
)

Arguments

terms

Terms provided by user

expect_query_name

Is the QUERY_NAME column expected?

expect_query_id

Is the QUERY_ID column expected?

source_text

Text describing the source of the terms, e.g., ⁠"the data frame provided for the ⁠definition⁠ element"⁠.

Value

An error is issued if

Author(s)

Stefan Bundfuss

See Also

create_query_data(), query()

Source Specifications: assert_db_requirements(), assert_valid_queries(), censor_source(), date_source(), death_event, derive_var_dthcaus(), event_source(), extend_source_datasets(), filter_date_sources(), format.sdg_select(), format.smq_select(), list_tte_source_objects(), params(), query(), sdg_select(), smq_select(), tte_source(), validate_query(), validate_sdg_select(), validate_smq_select()

Examples


try(
  assert_terms(
    terms = 42,
    source_text = "object provided by the `definition` element"
  )
)

[Package admiral version 0.8.4 Index]