Skip to contents

Assertion Functions

Checks the inputs for user-facing functions and provides error, warnings and other messaging around expectation of inputs.

assert_atomic_vector()
Is an Argument an Atomic Vector?
assert_character_scalar()
Is an Argument a Character Scalar (String)?
assert_character_vector()
Is an Argument a Character Vector?
assert_data_frame()
Is an Argument a Data Frame?
assert_date_var()
Is a Variable in a Dataset a Date or Datetime Variable?
assert_date_vector()
Is an object a date or datetime vector?
assert_expr()
Assert Argument is an Expression
assert_expr_list()
Is an Argument a List of Expressions?
assert_filter_cond()
Is an Argument a Filter Condition?
assert_function()
Is Argument a Function?
assert_integer_scalar()
Is an Argument an Integer Scalar?
assert_list_element()
Is an Element of a List of Lists/Classes Fulfilling a Condition?
assert_list_of()
Is an Argument a List of Objects of a Specific S3 Class or Type?
assert_logical_scalar()
Is an Argument a Logical Scalar (Boolean)?
assert_named()
Assert Argument is a Named List or Vector
assert_numeric_vector()
Is an Argument a Numeric Vector?
assert_one_to_one()
Is There a One to One Mapping between Variables?
assert_param_does_not_exist()
Asserts That a Parameter Does Not Exist in the Dataset
assert_s3_class()
Is an Argument an Object of a Specific S3 Class?
assert_same_type()
Are All Argument of the Same Type?
assert_symbol()
Is an Argument a Symbol?
assert_unit()
Asserts That a Parameter is Provided in the Expected Unit
assert_vars()
Is an Argument a List of Variables?
assert_varval_list()
Is an Argument a Variable-Value List?

Get Functions

Gets information or input from an object

get_constant_vars()
Get Constant Variables
get_dataset()
Retrieve a Dataset from the admiraldev_environment environment
get_duplicates()
Get Duplicates From a Vector
get_source_vars()
Get Source Variables from a List of Expressions

Is Functions

Is the object what it says it is

is_auto()
Checks if the argument equals the auto keyword
is_named()
Is a named argument
is_order_vars()
Is order vars?
is_valid_dtc()
Is this string a valid DTC

What Functions

What type of object is this?

what_is_it()
What Kind of Object is This?

Warning Functions

Custom warnings intended for users

suppress_warning()
Suppress Specific Warnings
warn_if_incomplete_dtc()
Warn if incomplete dtc
warn_if_inconsistent_list()
Warn If Two Lists are Inconsistent
warn_if_invalid_dtc()
Warn If a Vector Contains Unknown Datetime Format
warn_if_vars_exist()
Warn If a Variable Already Exists

Test Helper Functions

Test Utilities that help with organization and presentation of tests

expect_dfs_equal()
Expectation: Are Two Datasets Equal?

Temporary Variables

Tools for creating and removing temporary variables within a dataset

get_new_tmp_var()
Get a New Temporary Variable Name for a Dataset
remove_tmp_vars()
Remove All Temporary Variables Created Within the Current Function Environment

Getting Datasets

Retrieve a dataset from the admiraldev_environment enironment

Quosure Helper Functions

Helping your quosure needs

add_suffix_to_vars()
Add a Suffix to Variables in a List of Expressions
expr_c()
Concatenate One or More Expressions
replace_symbol_in_expr()
Replace Symbols in an Expression
replace_values_by_names()
Replace Expression Value with Name

Quoting Helper Functions

Helping your quoting needs

backquote()
Wrap a String in Backquotes
dquote()
Wrap a String in Double Quotes
enumerate()
Enumerate Multiple Elements
squote()
Wrap a String in Single Quotes

Utilities used within Derivation Functions

process_set_values_to()
Process set_values_to Argument

Join Functions

dplyr join function without warning about different attributes

Miscellaneous

Utilities without a theme

arg_name()
Extract Argument Name from an Expression
contains_vars()
check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions
convert_dtm_to_dtc()
Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable)
dataset_vignette()
Output a Dataset in a Vignette in the admiral Format
extract_vars()
Extract All Symbols from a List of Expressions
filter_if()
Optional Filter
friendly_type_of()
Return English-friendly messaging for object-types
`%notin%`
Negated Value Matching
`%or%`
Or
valid_time_units()
Valid Time Units
vars2chr()
Turn a List of Expressions into a Character Vector

Deprecated

As admiral is still evolving, functions/arguments may need to be removed or replaced over time. In such cases, the function/argument will enter the following 6-month deprecation cycle:

  • In the first release (0-3 months), there will be a warning issued if you use the function/argument, but it will still be available to use.
  • In the following release (3-6 months), an error will be produced if you use the function/argument.
  • Finally, from the 3rd release (6 months) onwards, the function/argument will be removed from admiral and its documentation completely.

Note: Guidance on replacement functionality can be found in the warning/error message produced or in the function’s documentation.

Below, you can find a list of functions in the process of being deprecated:

assert_function_param()
Assert Argument is a Parameter of a Function
assert_has_variables()
Does a Dataset Contain All Required Variables?
assert_named_exprs()
Assert Argument is a Named List of Expressions