Yes, you can easily check your package in R programming. If you are having your list of packages, compare it to the output from installed.packages()[,"Package"] and install the missing packages.
list.of.packages <- c("ggplot2", "Rcpp")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)