The pversion_check4mismatch()
function
checks if there is any mismatch between
the currently loaded packages and the packages in the specified library path.
The pversion_report()
function
gives a table of all specified packages,
with their loaded and installed versions,
regardless if there is a mismatch or not.
Arguments
- pkgs
a character vector with the package name(s).
Packages that are not actually loaded will be ignored.
Base/core R will also be ignored.
IfNULL
, all loaded packages (see loadedNamespaces) excluding core/base R will be checked.- lib.loc
character vector specifying library search path (the location of R library trees to search through).
Thelib.loc
argument would usually be.libPaths()
.
See also loadNamespace.
Value
For pversion_check4mismatch()
:
If no mismatch between loaded versions and those in lib.loc
were found,
returns NULL
.
Otherwise it returns a data.frame
,
with the loaded version and library version of the specified packages.
For pversion_report()
:
Returns a data.frame
,
with the loaded version and library version of the specified packages,
as well as a logical column indicating whether the two versions are equal (TRUE
),
or not equal (FALSE
).
Examples
"dplyr" %installed in% .libPaths()
#> dplyr
#> TRUE
import_as(~dpr., "dplyr")
#> Importing packages and registering methods...
#> Done
#> You can now access the functions using `dpr.$`
#> For conflicts report, packages order, and other attributes, run `attr.import(dpr.)`
pversion_check4mismatch()
#> NULL
pversion_report()
#> package version_loaded version_lib.loc versions_equal
#> 1 powerjoin 0.1.0 0.1.0 TRUE
#> 2 rappdirs 0.3.3 0.3.3 TRUE
#> 3 sass 0.4.9 0.4.9 TRUE
#> 4 utf8 1.2.4 1.2.4 TRUE
#> 5 generics 0.1.3 0.1.3 TRUE
#> 6 tidyr 1.3.1 1.3.1 TRUE
#> 7 xml2 1.3.6 1.3.6 TRUE
#> 8 stringi 1.8.4 1.8.4 TRUE
#> 9 digest 0.6.37 0.6.37 TRUE
#> 10 magrittr 2.0.3 2.0.3 TRUE
#> 11 evaluate 1.0.3 1.0.3 TRUE
#> 12 fastmap 1.2.0 1.2.0 TRUE
#> 13 jsonlite 1.9.0 1.9.0 TRUE
#> 14 whisker 0.4.1 0.4.1 TRUE
#> 15 purrr 1.0.2 1.0.2 TRUE
#> 16 fansi 1.0.6 1.0.6 TRUE
#> 17 scales 1.3.0 1.3.0 TRUE
#> 18 textshaping 0.3.7 0.3.7 TRUE
#> 19 httr2 1.1.0 1.1.0 TRUE
#> 20 jquerylib 0.1.4 0.1.4 TRUE
#> 21 cli 3.6.4 3.6.4 TRUE
#> 22 rlang 1.1.5 1.1.5 TRUE
#> 23 munsell 0.5.1 0.5.1 TRUE
#> 24 remotes 2.5.0 2.5.0 TRUE
#> 25 withr 3.0.0 3.0.0 TRUE
#> 26 cachem 1.1.0 1.1.0 TRUE
#> 27 yaml 2.3.10 2.3.10 TRUE
#> 28 memoise 2.0.1 2.0.1 TRUE
#> 29 dplyr 1.1.4 1.1.4 TRUE
#> 30 colorspace 2.1-0 2.1.0 TRUE
#> 31 ggplot2 3.5.1 3.5.1 TRUE
#> 32 vctrs 0.6.5 0.6.5 TRUE
#> 33 R6 2.6.1 2.6.1 TRUE
#> 34 lifecycle 1.0.4 1.0.4 TRUE
#> 35 fs 1.6.5 1.6.5 TRUE
#> 36 htmlwidgets 1.6.4 1.6.4 TRUE
#> 37 ragg 1.3.1 1.3.1 TRUE
#> 38 fontawesome 0.5.3 0.5.3 TRUE
#> 39 pkgconfig 2.0.3 2.0.3 TRUE
#> 40 desc 1.4.3 1.4.3 TRUE
#> 41 tinycodet 0.5.6 0.5.6 TRUE
#> 42 pkgdown 2.1.1 2.1.1 TRUE
#> 43 pillar 1.9.0 1.9.0 TRUE
#> 44 bslib 0.9.0 0.9.0 TRUE
#> 45 gtable 0.3.5 0.3.5 TRUE
#> 46 glue 1.8.0 1.8.0 TRUE
#> 47 data.table 1.16.4 1.16.4 TRUE
#> 48 Rcpp 1.0.14 1.0.14 TRUE
#> 49 systemfonts 1.2.1 1.2.1 TRUE
#> 50 collapse 2.0.18 2.0.18 TRUE
#> 51 xfun 0.51 0.51 TRUE
#> 52 tibble 3.2.1 3.2.1 TRUE
#> 53 tidyselect 1.2.1 1.2.1 TRUE
#> 54 rstudioapi 0.17.1 0.17.1 TRUE
#> 55 knitr 1.49 1.49 TRUE
#> 56 farver 2.1.1 2.1.1 TRUE
#> 57 htmltools 0.5.8.1 0.5.8.1 TRUE
#> 58 labeling 0.4.3 0.4.3 TRUE
#> 59 rmarkdown 2.29 2.29 TRUE
#> 60 downlit 0.4.4 0.4.4 TRUE