Returns a securer::securer_tool() that looks up R function
documentation from a set of allowed packages.
Usage
tool_r_help(
allowed_packages = c("base", "stats", "utils", "methods", "grDevices", "graphics",
"datasets"),
max_lines = 100,
max_calls = NULL
)
r_help_tool(...)Details
The tool restricts documentation lookup to the packages specified
in allowed_packages. Both topic name and package name must be
provided; the package must be in the allow-list.
Help text is rendered as plain text via tools::Rd2txt() and
truncated to max_lines lines.
See also
Other tool factories:
tool_calculator(),
tool_data_profile(),
tool_fetch_url(),
tool_plot(),
tool_query_sql(),
tool_read_file(),
tool_write_file()
Examples
# \donttest{
tool <- tool_r_help(
allowed_packages = c("base", "stats", "utils"),
max_lines = 200
)
# }