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 sass 0.4.9 0.4.9 TRUE
#> 3 utf8 1.2.4 1.2.4 TRUE
#> 4 generics 0.1.3 0.1.3 TRUE
#> 5 tidyr 1.3.1 1.3.1 TRUE
#> 6 xml2 1.3.6 1.3.6 TRUE
#> 7 stringi 1.8.4 1.8.4 TRUE
#> 8 digest 0.6.35 0.6.35 TRUE
#> 9 magrittr 2.0.3 2.0.3 TRUE
#> 10 evaluate 0.23 0.23 TRUE
#> 11 fastmap 1.1.1 1.1.1 TRUE
#> 12 jsonlite 1.8.8 1.8.8 TRUE
#> 13 whisker 0.4.1 0.4.1 TRUE
#> 14 httr 1.4.7 1.4.7 TRUE
#> 15 purrr 1.0.2 1.0.2 TRUE
#> 16 fansi 1.0.6 1.0.6 TRUE
#> 17 tidytable 0.11.0 0.11.0 TRUE
#> 18 scales 1.3.0 1.3.0 TRUE
#> 19 textshaping 0.3.7 0.3.7 TRUE
#> 20 jquerylib 0.1.4 0.1.4 TRUE
#> 21 cli 3.6.2 3.6.2 TRUE
#> 22 rlang 1.1.3 1.1.3 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.0.8 1.0.8 TRUE
#> 27 yaml 2.3.8 2.3.8 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 curl 5.2.1 5.2.1 TRUE
#> 33 vctrs 0.6.5 0.6.5 TRUE
#> 34 R6 2.5.1 2.5.1 TRUE
#> 35 lifecycle 1.0.4 1.0.4 TRUE
#> 36 fs 1.6.4 1.6.4 TRUE
#> 37 htmlwidgets 1.6.4 1.6.4 TRUE
#> 38 ragg 1.3.1 1.3.1 TRUE
#> 39 pkgconfig 2.0.3 2.0.3 TRUE
#> 40 desc 1.4.3 1.4.3 TRUE
#> 41 tinycodet 0.5.3 0.5.3 TRUE
#> 42 gtable 0.3.5 0.3.5 TRUE
#> 43 pkgdown 2.0.9 2.0.9 TRUE
#> 44 pillar 1.9.0 1.9.0 TRUE
#> 45 bslib 0.7.0 0.7.0 TRUE
#> 46 glue 1.7.0 1.7.0 TRUE
#> 47 data.table 1.15.4 1.15.4 TRUE
#> 48 Rcpp 1.0.12 1.0.12 TRUE
#> 49 systemfonts 1.0.6 1.0.6 TRUE
#> 50 collapse 2.0.14 2.0.14 TRUE
#> 51 xfun 0.43 0.43 TRUE
#> 52 tibble 3.2.1 3.2.1 TRUE
#> 53 tidyselect 1.2.1 1.2.1 TRUE
#> 54 rstudioapi 0.16.0 0.16.0 TRUE
#> 55 knitr 1.46 1.46 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.26 2.26 TRUE
#> 60 downlit 0.4.3 0.4.3 TRUE