| Title: | Ecosystem for Mediation Analysis in R |
|---|---|
| Description: | A meta-package that loads the core packages in the mediation analysis ecosystem: 'medfit' (infrastructure) and 'RMediation' (confidence intervals). 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.1.1 |
| Built: | 2026-10-31 07:46:30 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()
Prints a summary of the installed mediationverse packages, their versions,
and installation sources. Inspired by tidyverse::tidyverse_sitrep().
mediationverse_sitrep()mediationverse_sitrep()
Invisibly returns a data frame with package status. Called for its side effect of printing the situation report.
mediationverse_sitrep()mediationverse_sitrep()
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) — CRAN has 0.3.2, which predates two
result-changing fixes in 0.5.0 (serial te()/pm() and confint(parm = "paths"))
probmed: GitHub (data-wise/probmed)
RMediation: CRAN
medrobust: GitHub (data-wise/medrobust)
medsim: GitHub (data-wise/medsim)
missingmed: GitHub (data-wise/missingmed)
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)