Skip to contents

The goal of libminer is to provide an overview of your R library setup. It is a toy package created as a part of a workshop and not meant for serious use.

Installation

You can install the development version of libminer from GitHub with:

# install.packages("pak")
pak::pak("jennybc/libminer")

Example usage

To get a count of installed packages in each of your library locations, optionally with the total sizes, use the lib_summary() function:

library(libminer)
lib_summary()
#>                                                                                         Library
#> 1                          /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#> 2 /private/var/folders/44/rlq1jl6x00bfmbg_l9jdr2080000gp/T/Rtmp5vo2mM/temp_libpath134ef613f68fe
#> 3                                         /Users/morteza.aslanzadeh/Library/R/arm64/4.5/library
#>   n_packages
#> 1        518
#> 2          1
#> 3        133
# specify `sizes = TRUE` to calculate the total size on disk of your packages
lib_summary(sizes = TRUE)
#>                                                                                         Library
#> 1                          /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#> 2 /private/var/folders/44/rlq1jl6x00bfmbg_l9jdr2080000gp/T/Rtmp5vo2mM/temp_libpath134ef613f68fe
#> 3                                         /Users/morteza.aslanzadeh/Library/R/arm64/4.5/library
#>   n_packages lib_size
#> 1        518     3.8G
#> 2          1   14.75K
#> 3        133  339.58M