Skip to contents

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.

Usage

pversion_check4mismatch(pkgs = NULL, lib.loc = .libPaths())

pversion_report(pkgs = NULL, lib.loc = .libPaths())

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.
If NULL, 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).
The lib.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).

See also

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 RColorBrewer          1.1-3           1.1.3           TRUE
#> 12     evaluate          1.0.3           1.0.3           TRUE
#> 13      fastmap          1.2.0           1.2.0           TRUE
#> 14     jsonlite          1.9.0           1.9.0           TRUE
#> 15      whisker          0.4.1           0.4.1           TRUE
#> 16        purrr          1.0.2           1.0.2           TRUE
#> 17        fansi          1.0.7           1.0.7           TRUE
#> 18       scales          1.4.0           1.4.0           TRUE
#> 19  textshaping          0.3.7           0.3.7           TRUE
#> 20        httr2          1.1.0           1.1.0           TRUE
#> 21    jquerylib          0.1.4           0.1.4           TRUE
#> 22          cli          3.6.4           3.6.4           TRUE
#> 23        rlang          1.1.5           1.1.5           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      ggplot2          4.0.2           4.0.2           TRUE
#> 31         curl          6.2.1           6.2.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.6.0           0.6.0           TRUE
#> 42       gtable          0.3.6           0.3.6           TRUE
#> 43      pkgdown          2.1.1           2.1.1           TRUE
#> 44       pillar          1.9.0           1.9.0           TRUE
#> 45        bslib          0.9.0           0.9.0           TRUE
#> 46         glue          1.8.0           1.8.0           TRUE
#> 47   data.table         1.17.8          1.17.8           TRUE
#> 48         Rcpp          1.1.1           1.1.1           TRUE
#> 49  systemfonts          1.2.1           1.2.1           TRUE
#> 50     collapse          2.1.4           2.1.4           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           S7          0.2.1           0.2.1           TRUE
#> 61      downlit          0.4.4           0.4.4           TRUE