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_grpname = FALSE, expect_grpid = FALSE, source_text)

Arguments

terms

Terms provided by user

expect_grpname

Is the GRPNAME column expected?

expect_grpid

Is the GRPID 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

See Also

create_query_data(), query()

Other Advanced Functions: assert_db_requirements(), assert_valid_queries(), extend_source_datasets(), filter_date_sources(), format.basket_select(), list_tte_source_objects(), params(), validate_basket_select(), validate_query()

Examples


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

[Package admiral version 0.12.0 Index]