View source: R/spec_accessors.R
| spec_methods | R Documentation |
Return the method definitions a specification carries. Variables and
value-level rows reference these by method_id; validate_spec() checks
that every reference resolves and that each referenced method is
complete (has a description).
spec_methods(spec)
spec |
The specification to read. |
A data frame of method metadata, one row per method, with all
eight columns: method_id, description, name, type,
expression_context, expression_code, document_id, pages. Empty
when the spec defines no methods.
spec_comments(), spec_documents(), validate_spec().
# ---- Example 1: the methods a spec defines ----
#
# Build a spec with one derivation method and read it back.
spec <- artoo_spec(
data.frame(dataset = "ADSL"),
data.frame(dataset = "ADSL", variable = "AGEGR1", data_type = "string"),
methods = data.frame(
method_id = "MT.AGEGR1",
description = "Age group from AGE.",
stringsAsFactors = FALSE
)
)
spec_methods(spec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.