Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

help-internal

Helper functions for the help functionality


Description

help_topic_target parses the expression being passed to the help function call to find the innermost module subset expression in it. find_env acts similarly to find, except that it looks in the current environment’s parents rather than in the global environment search list, it returns only one hit (or zero), and it returns the environment rather than a character string. call_help invokes a help() call expression for a package help topic, finding the first help function definition, ignoring the one from this package.

Usage

help_topic_target(topic, caller)

find_env(name, caller)

call_help(call, caller)

Arguments

topic

the unevaluated expression passed to help.

caller

the environment from which help was called.

name

the name to look for.

call

the patched help call expression.

Value

help_topic_target returns a list of two elements containing the innermost module of the help call, as well as the name of the object that’s the subject of the help call. For help(a$b$c$d), it returns list(c, quote(d)).


box

Write Reusable, Composable and Modular R Code

v1.0.2
MIT + file LICENSE
Authors
Konrad Rudolph [aut, cre] (<https://orcid.org/0000-0002-9866-7051>), Michael Schubert [ctb] (<https://orcid.org/0000-0002-6862-5221>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.