Package 'animovement'

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] (ORCID: <https://orcid.org/0000-0002-9998-0058>)
Maintainer: Mikkel Roald-Arbøl <[email protected]>
License: GPL-3 + file LICENSE
Version: 0.7.3
Built: 2026-05-13 09:59:03 UTC
Source: https://github.com/animovement/animovement

Help Index


Conflicts between the animovement and other packages

Description

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.

Usage

animovement_conflicts(pkg = animovement_packages())

Arguments

pkg

character. A vector of packages to check conflicts for. The default is all animovement packages.

Value

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.

See Also

animovement

Examples

# Check conflicts between animovement packages and all attached packages
animovement_conflicts()

# Check conflicts among all attached packages
animovement_conflicts(sub("package:", "", search()[-1]))

List all animovement dependencies

Description

Lists all animovement dependencies and the local and CRAN versions of packages and dependencies.

Usage

animovement_deps(
  pkg = animovement_packages(),
  recursive = FALSE,
  repos = getOption("repos"),
  include.self = FALSE,
  check.deps = TRUE
)

Arguments

pkg

character vector of packages to check dependencies and versions of. The default is all animovement packages.

recursive

logical. TRUE recursively determines all packages required to operate these packages. FALSE will only list the packages and their direct dependencies.

repos

the repositories to use to check for updates. Defaults to getOptions("repos").

include.self

logical. TRUE also includes the animovement package and checks against the CRAN version.

check.deps

logical. FALSE will not determine dependencies but only display the update status of packages in pkg.

Value

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.

See Also

animovement_sitrep, animovement


Detach animovement packages

Description

Detaches animovement packages, removing them from the search path.

Usage

animovement_detach(
  ...,
  unload = FALSE,
  force = FALSE,
  include.self = TRUE,
  session = FALSE
)

Arguments

...

comma-separated package names, quoted or unquoted, or vectors of package names. If left empty, all packages returned by animovement_packages are detached.

unload

logical. TRUE also unloads the packages using detach(name, unload = TRUE).

force

logical. should a animovement package be detached / unloaded even though other attached packages depend on it?

include.self

logical. TRUE also includes the animovement package - only applicable if ... is left empty.

session

logical. TRUE also removes the packages from options("animovement.extend"), so they will not be attached again with library(animovement) in the current session. If ... is left empty and include.self = TRUE, this will clear all animovement options set for the session.

Value

animovement_detach returns NULL invisibly.

See Also

animovement_extend, animovement


Extend the animovement

Description

Loads additional packages as part of the animovement.

Usage

animovement_extend(
  ...,
  install = FALSE,
  check.conflicts = !isTRUE(getOption("animovement.quiet"))
)

Arguments

...

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?

Details

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).

Value

animovement_extend returns NULL invisibly.

See Also

animovement_detach, animovement


Install (missing) animovement packages

Description

This function (by default) checks if any animovement package is missing and installs the missing package(s).

Usage

animovement_install(..., only.missing = TRUE, install = TRUE)

Arguments

...

comma-separated package names, quoted or unquoted, or vectors of package names. If left empty, all packages returned by animovement_packages are checked.

only.missing

logical. TRUE only installs packages that are unavailable. FALSE installs all packages, even if they are available.

install

logical. TRUE will proceed to install packages, whereas FALSE (recommended) will print the installation command asking you to run it in a clean R session.

Value

animovement_install returns NULL invisibly.

Note

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.

See Also

animovement_update, animovement


Download all suggested packages

Description

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.

Usage

animovement_install_suggested(package = "animovement")

animovement_show_suggested(package = "animovement")

Arguments

package

Character string specifying the package name. Currently only "animovement" is supported.

Details

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 (aniframe, aniread, aniprocess, animetric, anicheck, anivis), excluding development packages (knitr, rmarkdown, testthat).

If package {pak} is installed, pak::pkg_install() will be used to install packages. Otherwise, utils::install.packages() is used with the animovement R-universe repository.

Value

Invisible NULL. Used for side-effect of installing packages.

Examples

# download all suggested packages
if (FALSE) {
  animovement_install_suggested("animovement")
}

# listing all soft/weak dependencies
animovement_show_suggested()

List all packages in the animovement

Description

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.

Usage

animovement_packages(extensions = TRUE, include.self = TRUE)

Arguments

extensions

logical. TRUE appends the set of core packages with all packages found in options("animovement.extend").

include.self

logical. Include the animovement package in the list?

Value

A character vector of package names.

See Also

animovement_extend, animovement

Examples

animovement_packages()

Get a situation report on the animovement

Description

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.

Usage

animovement_sitrep(...)

Arguments

...

arguments other than pkg passed to animovement_deps.

Value

animovement_sitrep returns NULL invisibly.

See Also

animovement_deps, animovement


Update animovement packages

Description

This will check all animovement packages (and their dependencies) for updates and (optionally) install those updates.

Usage

animovement_update(..., install = FALSE)

Arguments

...

arguments passed to animovement_deps.

install

logical. TRUE will proceed to install outdated packages, whereas FALSE (recommended) will print the installation command asking you to run it in a clean R session.

Value

animovement_update returns NULL invisibly.

See Also

animovement_deps, animovement