has_package: Check if a package is already installed

Description Usage Arguments Value Examples

Description

Read package list and check if a package is installed or not.

Usage

1
has_package(pkg, lib.loc = NULL)

Arguments

pkg

a character vector, each value represents a package name.

lib.loc

a character vector of directory names of R libraries, or 'NULL'. The default value of 'NULL' corresponds to all libraries currently known.'

Value

a logical vector. TRUE means the package is installed.

Examples

1
has_package('stringr')

jzsh2000/jzshr documentation built on May 20, 2019, 6:29 a.m.