Convenience function that compiles the recipe to an execution plan via
recipe_to_plan and immediately executes it via
ds.omop.plan.execute. Symbol names for server-side datasets
are derived from the recipe's output result_symbol fields, or
auto-generated as D_<name>.
Usage
recipe_execute(
recipe,
out = NULL,
symbol = "omop",
conns = NULL,
output_mode = "memory",
cohort = NULL,
tables = NULL,
combine = "union"
)Arguments
- recipe
An
omop_recipeobject.- out
Named character vector;
output_name -> symbol_namemapping. IfNULL, auto-generates symbol names from the recipe's output specifications.- symbol
Character; OMOP session symbol on the server (default
"omop").- conns
DSI connections or
NULL(uses active connections).- output_mode
Character;
"memory"(default) or"staged". Passed through tods.omop.plan.execute.- cohort
Optional recipe-level scope cohort applied at execution time: a
dsomop_cohort_handle, acohort_definition_id, or a server-side cohort table name. When supplied (with or withouttables) it replaces any scope already on the recipe;NULL(the default) leaves the recipe's own scope untouched. Folded withtablesbycombineand intersected into every population (seeomop_recipe).- tables
Optional character vector of
omop.tablesymbol names to add to the execution-time scope (their distinct persons). May be combined withcohort.- combine
Character; how to fold the scope sources together:
"union"(the default) or"intersect".
Value
Invisibly, the output symbol mapping (a named character vector).
As with ds.omop.plan.execute, the produced symbols are
recorded on the session so the manipulation wrappers can default to the
last one.
Examples
if (FALSE) { # \dontrun{
recipe_execute(recipe)
recipe_execute(recipe, output_mode = "staged")
# Or with explicit symbol mapping:
recipe_execute(recipe, out = c(features_wide = "D_features"))
# Scope every population to a cohort intersected with a workspace table:
recipe_execute(recipe, cohort = my_cohort, tables = "inclusion_set",
combine = "intersect")
} # }