Skip to contents

List a subset of all installed packages

Usage

ls_pkg(pkg, ignore_case = TRUE, as_regex = FALSE)

Arguments

pkg

A character vector of package names.

ignore_case

Do not distinguish between upper and lower case letters in pkg. If FALSE, pkg is treated case-sensitive.

as_regex

Interpret pkg as regular expression(s). If FALSE, pkg is interpreted literally.

Value

A tibble.

See also

Other R package functions: assert_pkg(), is_pkg_cran(), is_pkg_dir(), is_pkg_installed(), is_pkgdown_dir(), use_pkg()

Examples

pal::ls_pkg(pkg = c("methods", "utils"))
#> # A tibble: 2 × 16
#>   Package LibPath     Version Priority Depends Imports LinkingTo Suggests Enhances License License_is_FOSS License_restricts_use OS_type MD5sum NeedsCompilation
#>   <chr>   <chr>       <chr>   <chr>    <chr>   <chr>   <chr>     <chr>    <chr>    <chr>   <chr>           <chr>                 <chr>   <chr>  <chr>           
#> 1 methods /usr/lib/R… 4.4.1   base     NA      utils,… NA        codetoo… NA       Part o… NA              NA                    NA      NA     yes             
#> 2 utils   /usr/lib/R… 4.4.1   base     NA      NA      NA        methods… NA       Part o… NA              NA                    NA      NA     yes             
#> # ℹ 1 more variable: Built <chr>

pal::ls_pkg(pkg = "^ut",
            as_regex = TRUE)
#> # A tibble: 2 × 16
#>   Package LibPath     Version Priority Depends Imports LinkingTo Suggests Enhances License License_is_FOSS License_restricts_use OS_type MD5sum NeedsCompilation
#>   <chr>   <chr>       <chr>   <chr>    <chr>   <chr>   <chr>     <chr>    <chr>    <chr>   <chr>           <chr>                 <chr>   <chr>  <chr>           
#> 1 utf8    /home/sali… 1.2.4   NA       R (>= … NA      NA        "cli, c… NA       Apache… NA              NA                    NA      NA     yes             
#> 2 utils   /usr/lib/R… 4.4.1   base     NA      NA      NA        "method… NA       Part o… NA              NA                    NA      NA     yes             
#> # ℹ 1 more variable: Built <chr>