Learn R Programming

primarycensored (version 1.4.0)

pcd_stan_function_deps: Get dependencies for a Stan function

Description

Returns all Stan functions that the specified function depends on, in topological order (dependencies before the functions that use them).

Usage

pcd_stan_function_deps(
  function_name,
  stan_path = primarycensored::pcd_stan_path()
)

Value

A character vector of function names that the specified function depends on, ordered so that dependencies come before functions that use them. The requested function itself is included as the last element.

Arguments

function_name

Character string, the name of the Stan function.

stan_path

Character string specifying the path to the directory containing Stan files. Defaults to the Stan path of the primarycensored package.

See Also

Tools for working with package Stan functions pcd_load_stan_functions(), pcd_stan_dist_id(), pcd_stan_files(), pcd_stan_functions(), pcd_stan_path()

Examples

Run this code
# See what primarycensored_lpmf depends on
pcd_stan_function_deps("primarycensored_lpmf")

# A function with no dependencies
pcd_stan_function_deps("expgrowth_pdf")

Run the code above in your browser using DataLab