Learn R Programming

btw (version 1.0.0)

btw_tool_docs_package_news: Tool: Package Release Notes

Description

Include release notes for a package, either the release notes for the most recent package release or release notes matching a search term.

Usage

btw_tool_docs_package_news(package_name, search_term = "", `_intent` = "")

Value

Returns the release notes for the currently installed version of the package, or the release notes matching the search term.

Arguments

package_name

The name of the package as a string, e.g. "shiny".

search_term

A regular expression to search for in the NEWS entries. If empty, the release notes of the current installed version is included.

_intent

An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool.

See Also

btw_tools()

Other Tools: btw_tool_env_describe_data_frame(), btw_tool_env_describe_environment(), btw_tool_files_code_search(), btw_tool_files_list_files(), btw_tool_files_read_text_file(), btw_tool_files_write_text_file(), btw_tool_ide_read_current_editor(), btw_tool_package_docs, btw_tool_search_packages(), btw_tool_session_package_info(), btw_tool_session_platform_info(), btw_tool_web_read_url(), btw_tools()

Examples

Run this code
# Copy release notes to the clipboard for use in any AI app
btw("@news dplyr", clipboard = FALSE)

btw("@news dplyr join_by", clipboard = FALSE)

if (interactive()) { # can be slow
  if (R.version$major == 4 && R.version$minor > "2.0") {
    # Search through R's release notes.
    # This should find a NEWS entry from R 4.2
    btw("@news R dynamic rd content", clipboard = FALSE)
  }
}

# Tool use by LLMs via ellmer or MCP ----
btw_tool_docs_package_news("dplyr")

btw_tool_docs_package_news("dplyr", "join_by")

Run the code above in your browser using DataLab