---
title: "autoLibLoad"
author: Barry Zeeberg [aut, cre]
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{autoLibLoad}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

<style>
body {
text-align: justify;
font-size: 16pt;
font-family: Times;}
</style>

<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><span style='font-size:16.0pt;font-family:"Times New Roman",serif;
color:red'>Automate Retrieving, Building, Installing and Loading Specified Packages<o:p></o:p></span></b></p>

<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><span style='font-size:16.0pt;font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><span style='font-size:16.0pt;font-family:"Times New Roman",serif'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><span style='font-size:16.0pt;font-family:"Times New Roman",serif'>Barry
Zeeberg<o:p></o:p></span></b></p>

<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><span style='font-size:16.0pt;font-family:"Times New Roman",serif'>barryz2013@gmail.com<o:p></o:p></span></b></p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'></p><br>


Packages required for the search path may be located in the CRAN repository, the system library, or a local directory. *autoLibLoad()* automates determining the disposition of each required package, retrieving it, and loading it as needed.
<br><br>
If one of the required packages is already in the search path, we omit that package from the remainder of the processing.
<br><br>
For the missing packages, we first determine if that package is installed in the system library. If so, we simply load that package using the *library()* command.
<br><br>
Otherwise, we determine if that package is available from the authentic CRAN repository. If so, we install it using the *install.packages()* command, and then load it using the *library()* command.
<br><br>
Finally, any packages that are still missing might or might not be available from a designated local directory. If so, these are loaded using the command *install.packages(package_list, repos = NULL, type = 'source')*
<br><br>
The disposition of all the desired packages is returned by *autoLoad()* in a list, in particular noting which packages were successfully loaded in the search path.
