Returns a securer::securer_tool() that looks up R function
documentation from a set of allowed packages.
Usage
r_help_tool(
allowed_packages = c("base", "stats", "utils", "methods", "grDevices", "graphics",
"datasets"),
max_lines = 100,
max_calls = NULL
)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:
calculator_tool(),
data_profile_tool(),
fetch_url_tool(),
plot_tool(),
query_sql_tool(),
read_file_tool(),
write_file_tool()
Examples
# \donttest{
tool <- r_help_tool(
allowed_packages = c("base", "stats", "utils"),
max_lines = 200
)
# }