Skip to contents

Loads the describe_.md narrative shipped in the package's inst/extdata/describe_corpus.Rds capsule and prints it to the console. This is the R-side mirror of the Python morie.describe() function (closing the v0.9.5.4 parity gap; shipped in v0.9.5.5).

Usage

morie_describe(callable)

Arguments

callable

A morie callable, as a function object (passed unquoted), or a character scalar name. The lookup strips the leading morie_ prefix automatically.

Value

Invisibly returns the narrative as a character scalar. If no matching describe entry is found, returns NULL and prints a helpful diagnostic.

Details

The lookup is forgiving: a leading morie_ prefix on the callable name is stripped automatically, so morie_describe("aalen") and morie_describe("morie_aalen") resolve to the same narrative.

See also

morie_describe_by_name for the string-only variant that does not capture symbol names.

Examples

morie_describe("aalen")
#> # describe('aalen') — aalen
#> 
#> ## WHAT IT DOES
#> 
#> Aalen additive hazards model.
#> 
#> ## WHEN TO USE
#> 
#> This callable applies when you have inputs of the appropriate shape and
#> want the documented output. Read the function's source for the canonical
#> signature and assumptions.
#> 
#> ## WHEN NOT TO USE
#> 
#> - Inputs violate the function's assumed domain (NaN/Inf, wrong shape).
#> - A more specialised version exists for your data shape — see
#>   `cheatsheet()` or `_registry.py` for related callables.
#> - Sample size too small for the asymptotics this estimator relies on.
#> 
#> ## ASSUMPTIONS
#> 
#> - Inputs are real-valued and free of NaN/Inf.
#> - Observations are independent unless noted.
#> - See the FORMULA section in the source code for distributional
#>   specifics.
#> 
#> ## FORMULA
#> 
#> See the function's docstring `Formula:` line in
#> `fn/aalen.py`.
#> 
#> ## INPUTS / OUTPUTS
#> 
#> Inputs: documented in the function's `Parameters` block.
#> Outputs: a RichResult (dict-subclass) — `result["statistic"]`,
#> `.get(...)`, `for k in result` all work alongside the multi-section
#> `print(result)` render. See `morie.fn.describe('aalen')` for guidance.
#> 
#> ## WORKED EXAMPLE
#> 
#> ```python
#> from morie.fn.aalen import *
#> import numpy as np
#> # See the function signature in fn/aalen.py for argument names.
#> ```
#> 
#> ## COMMON MISTAKES
#> 
#> - Treating the result as a plain dict — it IS a dict (RichResult
#>   inherits from dict) but `print(result)` shows the multi-section
#>   render which is what you usually want.
#> - Ignoring warnings/interpretation when sample sizes are small.
#> 
#> ## REFERENCES
#> 
#> See the source file's `References` block.
morie_describe("morie_aalen")  # leading prefix stripped
#> # describe('aalen') — aalen
#> 
#> ## WHAT IT DOES
#> 
#> Aalen additive hazards model.
#> 
#> ## WHEN TO USE
#> 
#> This callable applies when you have inputs of the appropriate shape and
#> want the documented output. Read the function's source for the canonical
#> signature and assumptions.
#> 
#> ## WHEN NOT TO USE
#> 
#> - Inputs violate the function's assumed domain (NaN/Inf, wrong shape).
#> - A more specialised version exists for your data shape — see
#>   `cheatsheet()` or `_registry.py` for related callables.
#> - Sample size too small for the asymptotics this estimator relies on.
#> 
#> ## ASSUMPTIONS
#> 
#> - Inputs are real-valued and free of NaN/Inf.
#> - Observations are independent unless noted.
#> - See the FORMULA section in the source code for distributional
#>   specifics.
#> 
#> ## FORMULA
#> 
#> See the function's docstring `Formula:` line in
#> `fn/aalen.py`.
#> 
#> ## INPUTS / OUTPUTS
#> 
#> Inputs: documented in the function's `Parameters` block.
#> Outputs: a RichResult (dict-subclass) — `result["statistic"]`,
#> `.get(...)`, `for k in result` all work alongside the multi-section
#> `print(result)` render. See `morie.fn.describe('aalen')` for guidance.
#> 
#> ## WORKED EXAMPLE
#> 
#> ```python
#> from morie.fn.aalen import *
#> import numpy as np
#> # See the function signature in fn/aalen.py for argument names.
#> ```
#> 
#> ## COMMON MISTAKES
#> 
#> - Treating the result as a plain dict — it IS a dict (RichResult
#>   inherits from dict) but `print(result)` shows the multi-section
#>   render which is what you usually want.
#> - Ignoring warnings/interpretation when sample sizes are small.
#> 
#> ## REFERENCES
#> 
#> See the source file's `References` block.
# Function-object form: pass any morie callable unquoted
# (btsrp is the bootstrap primitive; its narrative ships in
# the bundled describe corpus).
morie_describe(btsrp)
#> # describe('btsrp') — bootstrap_ci
#> 
#> ## WHAT IT DOES
#> 
#> Bootstrap confidence interval (percentile, BCa, studentized).
#> 
#> ## WHEN TO USE
#> 
#> This callable applies when you have inputs of the appropriate shape and
#> want the documented output. Read the function's source for the canonical
#> signature and assumptions.
#> 
#> ## WHEN NOT TO USE
#> 
#> - Inputs violate the function's assumed domain (NaN/Inf, wrong shape).
#> - A more specialised version exists for your data shape — see
#>   `cheatsheet()` or `_registry.py` for related callables.
#> - Sample size too small for the asymptotics this estimator relies on.
#> 
#> ## ASSUMPTIONS
#> 
#> - Inputs are real-valued and free of NaN/Inf.
#> - Observations are independent unless noted.
#> - See the FORMULA section in the source code for distributional
#>   specifics.
#> 
#> ## FORMULA
#> 
#> See the function's docstring `Formula:` line in
#> `fn/btsrp.py`.
#> 
#> ## INPUTS / OUTPUTS
#> 
#> Inputs: documented in the function's `Parameters` block.
#> Outputs: a RichResult (dict-subclass) — `result["statistic"]`,
#> `.get(...)`, `for k in result` all work alongside the multi-section
#> `print(result)` render. See `morie.fn.describe('btsrp')` for guidance.
#> 
#> ## WORKED EXAMPLE
#> 
#> ```python
#> from morie.fn.btsrp import *
#> import numpy as np
#> # See the function signature in fn/btsrp.py for argument names.
#> ```
#> 
#> ## COMMON MISTAKES
#> 
#> - Treating the result as a plain dict — it IS a dict (RichResult
#>   inherits from dict) but `print(result)` shows the multi-section
#>   render which is what you usually want.
#> - Ignoring warnings/interpretation when sample sizes are small.
#> 
#> ## REFERENCES
#> 
#> See the source file's `References` block.