loadPackage {Dtableone}R Documentation

Install and Load Required Packages

Description

This function checks if a package is installed. If not, it stops and suggests the user to install the package manually. Once installed, the package is loaded into the R session.

Usage

loadPackage(pkg)

Arguments

pkg

A character string naming the package to be loaded.

Value

No return value. This function is called for its side effect of loading a package into the R session. It does not attempt to install the package automatically, relying instead on the user's action based on the provided message.

Examples

## Not run: 
  # To use this function, make sure the required package is already installed.
  # For example, to load the ggplot2 package, first ensure it's installed:
  # install.packages("ggplot2")
  loadPackage("ggplot2")

## End(Not run)


[Package Dtableone version 1.1.0 Index]