| Title: | An R toolbox for analysing movement across space and time |
|---|---|
| Description: | An R toolbox for analysing movement across space and time. |
| Authors: | Mikkel Roald-Arbøl [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-9998-0058>), Sebastian Krantz [ctb, cph] (Author of the fastverse, from which the package management code is adapted), Hadley Wickham [ctb] (Author of the tidyverse, from which that code originally derives), Posit Software, PBC [cph] |
| Maintainer: | Mikkel Roald-Arbøl <[email protected]> |
| License: | GPL-3 |
| Version: | 0.8.0.9002 |
| Built: | 2026-10-14 14:26:05 UTC |
| Source: | https://github.com/animovement/animovement |
This function lists all the conflicts among animovement packages and between animovement packages and other attached packages. It can also be used to check conflicts for any other attached packages.
animovement_conflicts(pkg = animovement_packages())animovement_conflicts(pkg = animovement_packages())
pkg |
character. A vector of packages to check conflicts for. The default is all animovement packages. |
An object of class 'animovement_conflicts': A named list of character vectors where the names are the conflicted objects, and the
content are the names of the package namespaces containing the object, in the order they appear on the search path.
# Check conflicts between animovement packages and all attached packages animovement_conflicts() # Check conflicts among all attached packages animovement_conflicts(sub("package:", "", search()[-1]))# Check conflicts between animovement packages and all attached packages animovement_conflicts() # Check conflicts among all attached packages animovement_conflicts(sub("package:", "", search()[-1]))
Lists all animovement dependencies and the local and CRAN versions of packages and dependencies.
animovement_deps( pkg = animovement_packages(), recursive = FALSE, repos = animovement_repos(), include.self = FALSE, check.deps = TRUE )animovement_deps( pkg = animovement_packages(), recursive = FALSE, repos = animovement_repos(), include.self = FALSE, check.deps = TRUE )
pkg |
character vector of packages to check dependencies and versions of. The default is all animovement packages. |
recursive |
logical. |
repos |
the repositories to use to check for updates. Defaults to |
include.self |
logical. |
check.deps |
logical. |
A data frame giving the package names, the CRAN and local version, and a logical variable stating whether the local version is behind the CRAN version.
animovement_sitrep, animovement
# The packages the suite depends on, and their versions head(animovement_deps()) # Including their dependencies in turn nrow(animovement_deps(recursive = TRUE))# The packages the suite depends on, and their versions head(animovement_deps()) # Including their dependencies in turn nrow(animovement_deps(recursive = TRUE))
Detaches animovement packages, removing them from the search path.
animovement_detach( ..., unload = FALSE, force = FALSE, include.self = TRUE, session = FALSE )animovement_detach( ..., unload = FALSE, force = FALSE, include.self = TRUE, session = FALSE )
... |
comma-separated package names, quoted or unquoted, or vectors of package names. If left empty, all packages returned by |
unload |
logical. |
force |
logical. should a animovement package be detached / unloaded even though other attached packages depend on it? |
include.self |
logical. |
session |
logical. |
animovement_detach returns NULL invisibly.
animovement_extend, animovement
# Detach one package animovement_detach(aniread) # Detach the whole suite, and forget any session extensions animovement_detach(session = TRUE)# Detach one package animovement_detach(aniread) # Detach the whole suite, and forget any session extensions animovement_detach(session = TRUE)
Loads additional packages as part of the animovement.
animovement_extend( ..., install = FALSE, check.conflicts = !isTRUE(getOption("animovement.quiet")) )animovement_extend( ..., install = FALSE, check.conflicts = !isTRUE(getOption("animovement.quiet")) )
... |
comma-separated package names, quoted or unquoted, or vectors of package names. |
install |
logical. Install packages not available? |
check.conflicts |
logical. Should conflicts between extension packages and attached packages be checked? |
When the animovement is extended calling animovement_extend(...), the packages that are not attached are attached, but conflicts are checked for all specified packages.
An options("animovement.extend") is set which stores these extension packages, regardless of whether they were already attached or not. When calling
animovement_packages, animovement_deps, animovement_conflicts, animovement_update, animovement_sitrep or animovement_detach, these packages are included as part of the animovement.
To extend the animovement for the current session when it is not yet loaded, users can also set options(animovement.extend = c(...)), where c(...)
is a character vector of package names, before calling library(animovement).
animovement_extend returns NULL invisibly.
animovement_detach, animovement
# Add packages to your animovement for this session. They are attached, and # their conflicts reported alongside the core packages. animovement_extend(ggplot2, tidyr) # Set the option before library(animovement) to extend on attach instead options(animovement.extend = c("ggplot2", "tidyr"))# Add packages to your animovement for this session. They are attached, and # their conflicts reported alongside the core packages. animovement_extend(ggplot2, tidyr) # Set the option before library(animovement) to extend on attach instead options(animovement.extend = c("ggplot2", "tidyr"))
This function (by default) checks if any animovement package is missing and installs the missing package(s).
animovement_install( ..., only.missing = TRUE, install = TRUE, repos = animovement_repos() )animovement_install( ..., only.missing = TRUE, install = TRUE, repos = animovement_repos() )
... |
comma-separated package names, quoted or unquoted, or vectors of package names. If left empty, all packages returned by |
only.missing |
logical. |
install |
logical. |
repos |
the repositories to install from. Defaults to |
animovement_install returns NULL invisibly.
There is also the possibility to set options(animovement.install = TRUE) before library(animovement), which will call animovement_install() before loading any packages to make sure all packages are available.
If you are using a .animovement configuration file inside a project (see vignette), you can also place _opt_animovement.install = TRUE before the list of packages in that file.
animovement_update, animovement
# Install any ecosystem packages that are missing animovement_install()# Install any ecosystem packages that are missing animovement_install()
In animovement, we have a minimal dependency policy to keep the package
light and fast to install. However, we rely on several packages for testing
and specific features. These "soft dependencies" can be downloaded at once
using this function, allowing you to fully utilize all of animovement's
functionalities without errors.
animovement_install_suggested(package = "animovement") animovement_show_suggested(package = "animovement")animovement_install_suggested(package = "animovement") animovement_show_suggested(package = "animovement")
package |
Character string specifying the package name. Currently only
|
To reduce the dependency load, animovement by default will not
download all internally needed packages. It will ask the user to download
them only if they are needed. The current function can help install all
packages that animovement and its ecosystem packages might need.
animovement_show_suggested() is a convenient helper to show the current
list of suggested packages.
This function will check the Suggests field of animovement and all its
imported packages (anicore, anispace, aniread, aniprocess, animetric, anicheck, anivis),
excluding packages only needed for development or documentation workflows
(knitr, rmarkdown, testthat, pak, here, covr, pkgdown, withr, ragg, curl,
readxl, tibble, tinytable), and packages already required by an ecosystem
package, which are installed regardless.
Under WebR, packages are installed with webr::install(), since
utils::install.packages() cannot build Emscripten packages in the browser.
Otherwise, if {pak} is installed then pak::pkg_install() is used, and
failing that utils::install.packages(). Repositories searched are CRAN, the
animovement R-universe and the Bioconductor R-universe – the last of which
is where rhdf5 comes from.
Invisible NULL. Used for side-effect of installing packages.
# listing all soft/weak dependencies animovement_show_suggested() # download all suggested packages animovement_install_suggested("animovement")# listing all soft/weak dependencies animovement_show_suggested() # download all suggested packages animovement_install_suggested("animovement")
Core packages are first fetched from a project-level configuration file (named .animovement, if found), otherwise the standard set of core packages is returned.
In addition, if extensions = TRUE, any packages used to extend the animovement for the current
session are also returned.
animovement_packages(extensions = TRUE, include.self = TRUE)animovement_packages(extensions = TRUE, include.self = TRUE)
extensions |
logical. |
include.self |
logical. Include the animovement package in the list? |
A character vector of package names.
animovement_extend, animovement
animovement_packages()animovement_packages()
The animovement packages are published on
R-universe rather than CRAN, so
getOption("repos") alone will not find them. This adds the R-universe
to a repository vector unless it is already present, and is the default for
animovement_deps, animovement_update and
animovement_install.
animovement_repos(repos = getOption("repos"))animovement_repos(repos = getOption("repos"))
repos |
a repository vector to extend. Defaults to |
A fresh R installation leaves CRAN set to the "@CRAN@" placeholder,
which available.packages refuses to resolve. Any such
entry is replaced with the CRAN cloud mirror. The CRAN entry is kept rather
than dropped because the animovement dependencies live there.
A named character vector of repository URLs.
animovement_update, animovement
animovement_repos() # Make it apply to install.packages() and friends for the whole session old <- options(repos = animovement_repos()) getOption("repos") options(old)animovement_repos() # Make it apply to install.packages() and friends for the whole session old <- options(repos = animovement_repos()) getOption("repos") options(old)
This function gives a quick overview of the version of R and all animovement packages (including availability updates for packages) and indicates whether any project-level configuration files are used.
animovement_sitrep(...)animovement_sitrep(...)
... |
arguments other than |
animovement_sitrep returns NULL invisibly.
# Versions of every animovement package, and whether any are behind animovement_sitrep()# Versions of every animovement package, and whether any are behind animovement_sitrep()
This will check all animovement packages (and their dependencies) for updates and (optionally) install those updates.
animovement_update(..., install = FALSE, repos = animovement_repos())animovement_update(..., install = FALSE, repos = animovement_repos())
... |
arguments passed to |
install |
logical. |
repos |
the repositories to check against and install from. Defaults to |
animovement_update returns NULL invisibly.
# Report which packages are behind, without changing anything animovement_update() # Pass install = TRUE to actually install what is out of date animovement_update(install = TRUE)# Report which packages are behind, without changing anything animovement_update() # Pass install = TRUE to actually install what is out of date animovement_update(install = TRUE)