Safely check if any version of the tool is installed.
Usage
sn_is_tool_installed(tool, version = NULL, base_dir = NULL)
Arguments
- tool
Tool object
- version
Character. Specific version to check (optional)
- base_dir
Character. Base directory for installations (optional, will use default toolbox if not provided)
Value
Logical. Installation status
See also
Other accessor functions:
sn_get_installed_versions()
,
sn_get_tool()
,
sn_get_tool_commands()
,
sn_get_tool_name()
,
sn_get_tool_version()
,
sn_get_tool_versions()
,
sn_get_toolbox_tools()
,
sn_get_toolcall_outputs()
,
sn_get_toolcall_runtime()
,
sn_get_toolcall_status()
,
sn_is_toolcall_success()
Examples
if (FALSE) { # \dontrun{
# Check if any version is installed
if (sn_is_tool_installed(tool)) {
# At least one version is ready to use
}
# Check if specific version is installed
if (sn_is_tool_installed(tool, "1.22")) {
# Version 1.22 is installed
}
} # }