Removes the OSRM backend binaries and optionally clears the PATH
configuration from the project's .Rprofile.
Usage
osrm_uninstall(
dest_dir = NULL,
clear_path = TRUE,
quiet = FALSE,
all = FALSE,
force = FALSE
)Arguments
- dest_dir
A string specifying the directory from which to remove OSRM binaries. If
NULL(the default), the function looks for an installation in the per-version subdirectories insidetools::R_user_dir("osrm.backend", which = "cache")and removes it. When multiple versions are installed, interactive sessions that are notquietwill be prompted (with a numbered menu and0to cancel) to choose a directory; otherwise,dest_dirmust be supplied. Ignored ifall = TRUE.- clear_path
A logical value. If
TRUE(default), also removes thePATHconfiguration from the project's.Rprofileby callingosrm_clear_path().- quiet
A logical value. If
TRUE, suppresses informational messages and confirmation prompts. Defaults toFALSE.- all
A logical value. If
TRUE, removes all OSRM installations found in the default cache directory. Will prompt for confirmation unlessforce = TRUE. Defaults toFALSE. WhenTRUE, thedest_dirparameter is ignored.- force
A logical value. If
TRUE, skips all confirmation prompts, enabling non-interactive usage. Defaults toFALSE.
Examples
# \donttest{
if (identical(Sys.getenv("OSRM_EXAMPLES"), "true")) {
# Install OSRM temporarily
install_dir <- osrm_install(path_action = "session", quiet = TRUE)
# Uninstall that specific version and clear PATH changes
osrm_uninstall(
dest_dir = install_dir,
clear_path = TRUE,
force = TRUE,
quiet = TRUE
)
# If multiple installs exist, remove them all
osrm_uninstall(all = TRUE, force = TRUE, quiet = TRUE)
}
# }