check package
# Clean environment
closeAllConnections()
rm(list=ls())
# Set enviroment
setwd("~/your working directory")
# Load packages
library(bnpa)
###################################################################################
# check.package.R - Check and install packages if necessary.
###################################################################################
# Choose the package name
package.name <- c("gtools")
# Check and install if not installed
check.package(package.name)
###################################################################################
RESULTS:
###################################################################################