| Title: | Ecosystem for Mediation Analysis in R |
|---|---|
| Description: | A meta-package that loads the core packages in the mediation analysis ecosystem: 'medfit' (infrastructure), 'probmed' (probabilistic effect sizes), 'RMediation' (confidence intervals), and 'medrobust' (sensitivity analysis). This package simplifies installation and provides a unified entry point for mediation analysis in R. Inspired by the 'tidyverse' and 'easystats' ecosystems. |
| Authors: | Davood Tofighi [aut, cre] (ORCID: <https://orcid.org/0000-0001-8523-7776>) |
| Maintainer: | Davood Tofighi <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.0.0.9000 |
| Built: | 2026-06-12 11:45:51 UTC |
| Source: | https://github.com/Data-Wise/mediationverse |
Identifies functions that are exported by multiple mediationverse packages, which could lead to masking issues.
mediationverse_conflicts(only_loaded = TRUE)mediationverse_conflicts(only_loaded = TRUE)
only_loaded |
Logical. Only check currently loaded packages? Default is TRUE. |
When multiple packages export a function with the same name, R uses the
version from the package that was loaded last. This function helps identify
such conflicts so you can use explicit namespacing (e.g., medfit::extract_mediation())
when needed.
A data frame with columns:
function_name: Name of the conflicting function
packages: Character vector of packages exporting this function
winner: The package whose version will be used (last loaded)
## Not run: # Show conflicts among loaded mediationverse packages mediationverse_conflicts() ## End(Not run)## Not run: # Show conflicts among loaded mediationverse packages mediationverse_conflicts() ## End(Not run)
Lists all core packages in the mediationverse ecosystem along with their installation status and versions.
mediationverse_packages(include_self = TRUE)mediationverse_packages(include_self = TRUE)
include_self |
Logical. Include mediationverse itself in the list? Default is TRUE. |
A data frame with columns:
package: Package name
installed: Logical, whether package is installed
version: Package version (NA if not installed)
attached: Logical, whether package is currently attached
mediationverse_packages()mediationverse_packages()
Updates all mediationverse packages to their latest versions from GitHub or CRAN.
mediationverse_update(packages = NULL, ...)mediationverse_update(packages = NULL, ...)
packages |
Character vector of package names to update. Default is all core packages. |
... |
Additional arguments passed to the installation function. |
This function uses pak::pak() if available (recommended), otherwise
falls back to remotes::install_github() for GitHub packages and
utils::install.packages() for CRAN packages.
Package sources:
mediationverse: GitHub (data-wise/mediationverse)
medfit: GitHub (data-wise/medfit)
probmed: GitHub (data-wise/probmed)
RMediation: CRAN
medrobust: GitHub (data-wise/medrobust)
medsim: GitHub (data-wise/medsim)
Invisibly returns a character vector of updated package names.
## Not run: # Update all packages mediationverse_update() # Update specific packages mediationverse_update(c("medfit", "probmed")) ## End(Not run)## Not run: # Update all packages mediationverse_update() # Update specific packages mediationverse_update(c("medfit", "probmed")) ## End(Not run)