Skip to contents

Converts the portable weight_spec from a RecipeWorkflow back into the format expected by load_survey() and add_weight(). For replicate weights with ANDA sources, automatically downloads the replicate file.

Usage

resolve_weight_spec(weight_spec, dest_dir = tempdir())

Arguments

weight_spec

Named list from RecipeWorkflow$weight_spec

dest_dir

Character directory for downloaded files (default: tempdir())

Value

Named list compatible with add_weight() output

See also

Examples

if (FALSE) { # \dontrun{
wf <- api_get_workflow("w_123")
weight <- resolve_weight_spec(wf$weight_spec)
} # }