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

<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'>Wrapper to Enhance the Functionality of the mvbutils::foodweb() Function<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'>One component of the return value of the mvbutils::foodweb() function is funmat. This component is described by the original authors as "a matrix of 0s and 1s showing what (row) calls what (column). The dimnames are the function names."</p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>I found this component to be very useful in helping me track my own development efforts, especially when my functions were distributed among several of my own under-development packages as well as established CRAN packages. But it was frustrating to me that the package associations of the tabulated functions were not shown.</p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>I was able to use another function find_funs() to determine that association, and then fold that into the funmat component of foodweb(). Finally, I was able to render the augmented table as html, in which the package names and functions were color-coded by package name, and the package names were hyperlinked to the corresponding CRAN pdf documentation.</p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>After running the program in the R Console (Figure 1), a typical example (Figure 2) was obtained

![Figure 1. R Console example](console.jpg){width=100%}

![Figure 2. foodwebWrapper example](html.jpg){width=150%}
<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>The rows represent the calling function, and the columns represent the called function. The color coding of the header information allows the visual intuition of the package structure. The color coding of the calling function is inherited by the relevant matrix row cells, to facilitate tracing the inheritance down from the package of the calling function.</p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>Figure 1 demonstrates using the interactive mode of foodwebWrapper(). This mode has the advantage of displaying the valid inputs to the user. Batch mode is also available, in which the package names are input *via* the command line parameter where=c("pack1","pack2", . . . "packN"). Batch mode is more convenient if you already have in hand a valid list of the desired packages.</p><br>

<p class=MsoNormal style='text-align:justify'><span style='font-size:16.0pt;
font-family:"Times New Roman",serif'>Finally, as a diversion from the monotony of the little rectangles, we can specify random chess pieces by <i>pawns=TRUE</i></p><br>
