<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Dear Nicholas (and Jonathan),</p>
    <p>You can use a separate (first) chunk to load the packages, and
      for that chunk, set options to suppress messages (and even
      warnings and errors - use with caution, of course). For example:</p>
    <p>```{r setup, echo=FALSE, message=FALSE}<br>
      require('BrailleR', quietly=TRUE);<br>
      require('sonify', quietly=TRUE);<br>
      ```</p>
    <p>This should suppress everything, I think. You could even build in
      some graceful error handling quite easily using two chunks, e.g.:<br>
    </p>
    <p>```{r setup, echo=FALSE, message=FALSE, warning=FALSE,
      error=FALSE}<br>
      errorMessages <- NULL;<br>
      if (!require('BrailleR', quietly=TRUE)) {<br>
        errorMessages <- c(errorMessages, "BrailleR did not load
      successfully!");<br>
      }<br>
      if (!require('sonify', quietly=TRUE)) {<br>
        errorMessages <- c(errorMessages, "Sonify did not load
      successfully!");<br>
      }<br>
      ```</p>
    <p>```{r package-errors}<br>
      if (!is.null(errorMessages)) {<br>
        stop(paste0('I encountered the following errors when loading
      packages:\n\n', paste0(errorMessages, collapse='\n')));<br>
      }<br>
      ```</p>
    <p>(didn't test, but should get you quite some ways towards a
      solution even if a bit buggy :-))<br>
    </p>
    <p>Kind regards,</p>
    <p>Gjalt-Jorn<br>
    </p>
    <div class="moz-signature">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <br>
      <table border="0">
        <tbody>
          <tr>
            <td style="font-size:12px; font-family: Trebuchet MS,
              Helvetica, Sans-serif;"> <b>Gjalt-Jorn Peters</b> <span
                style="color:rgb(153,153,153);"> |
                <a class="moz-txt-link-freetext" href="http://behaviorchange.eu">http://behaviorchange.eu</a><br>
                <br>
                Behavior change research | Health psychology <br>
                Intervention development | Applied social psychology </span>
            </td>
            <td style="font-family: Courier New, Courier, Fixed-width;
              font-size:70px;color:rgb(153,153,153);" valign="center">[</td>
            <td style="font-size: 1px;color:white;" valign="center"> <a
                href="http://greatergood.eu"><img alt="GG"
                  src="cid:part1.2333162E.6AA2EC36@behaviorchange.eu"
                  border="0"></a> </td>
            <td style="font-size: 1px;color:white;" valign="center"> <img
                alt=""
                src="cid:part3.E5BF0B30.54A0AAA2@behaviorchange.eu"
                height="1" border="0" width="10"> <a
                href="http://ou.nl"><img alt="OU"
                  src="cid:part4.9BE8FFD3.D141F473@behaviorchange.eu"
                  border="0"></a> <img alt=""
                src="cid:part3.E5BF0B30.54A0AAA2@behaviorchange.eu"
                height="1" border="0" width="10"> </td>
            <td style="font-size: 1px;color:white;" valign="center"> <a
                href="http://maastrichtuniversity.nl"><img alt="UM"
                  src="cid:part7.9D1C4B92.0F969F1F@behaviorchange.eu"
                  border="0"></a> </td>
            <td style="font-family: Courier New, Courier, Fixed-width;
              font-size:70px;color:rgb(153,153,153);">}</td>
          </tr>
        </tbody>
      </table>
      <style>body {font-family: arial, helvetica, sans-serif;}</style> <br>
    </div>
    <div class="moz-cite-prefix">On 2017-04-02 22:19, Godfrey, Jonathan
      via BlindRUG wrote:<br>
    </div>
    <blockquote
cite="mid:D59DA89C3CD73C44A799E7087F8E6A9E20DF64C3@tur-exch-node1.massey.ac.nz"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hello
            Nicholas,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Think
            of your R markdown document as a new R session with an empty
            workspace. You need to import the data you want and the
            additional packages you need.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Your
            commands will be in a number of chunks but they are all run
            sequentially as you would with any other R script.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In
            the end, your markdown file is a completely standalone
            record of the work you will do.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jonathan<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
              lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
            lang="EN-US"> BlindRUG [<a class="moz-txt-link-freetext" href="mailto:blindrug-bounces@nfbnet.org">mailto:blindrug-bounces@nfbnet.org</a>]
            <b>On Behalf Of </b>Nicholas J via BlindRUG<br>
            <b>Sent:</b> Monday, 3 April 2017 7:48 a.m.<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:blindrug@nfbnet.org">blindrug@nfbnet.org</a><br>
            <b>Cc:</b> Nicholas J<br>
            <b>Subject:</b> Re: [BlindRUG] Switching from Doing with
            Eyesight to Doing Without<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <div>
              <div>
                <p class="MsoNormal" style="margin-bottom:12.0pt">Dr.
                  Godfrey,<o:p></o:p></p>
              </div>
              <p class="MsoNormal" style="margin-bottom:12.0pt">Thank
                you for all the replies. In rmarkdown, is there a way to
                open a package without having to show the code
                library(packageName) in the output? I have had a lot of
                trouble in the past using the same data set in different
                code chunks. I can load it in one chunk and use it
                there, but I sometimes have trouble accessing the set in
                another code chunk. Is there something I can do so that
                I do not have to load the data set into every chunk?<o:p></o:p></p>
            </div>
            <p class="MsoNormal">Thank you,<o:p></o:p></p>
          </div>
          <p class="MsoNormal">Nicholas<o:p></o:p></p>
        </div>
        <div>
          <p class="MsoNormal"><o:p> </o:p></p>
          <div>
            <p class="MsoNormal">On Tue, Mar 14, 2017 at 9:59 PM,
              Nicholas J <<a moz-do-not-send="true"
                href="mailto:314nick15@gmail.com" target="_blank">314nick15@gmail.com</a>>
              wrote:<o:p></o:p></p>
            <div>
              <p class="MsoNormal">Hello,<o:p></o:p></p>
              <div>
                <p class="MsoNormal"><o:p> </o:p></p>
              </div>
              <div>
                <p class="MsoNormal">I am legally blind, with enough
                  vision to do things on the computer using Zoomtext and
                  using a portable cctv to view things from a distance.
                  I have been relying on this technology to do
                  everything from programming, to statistical work, to
                  reading, to viewing boards, and surfing the web. I can
                  still see the same amount, but the inefficiencies in
                  all these techniques has become apparent. I have been
                  switching over to technologies like Jaws, Kurzweil,
                  and braille. For r programming, I'm thinking Jaws is
                  the best to use, but I am not sure how. I've read
                  about the terminal and used it before. I mainly use
                  Rstudio visually now and saw that many of the features
                  in it like creating rmarkdown files and such would
                  have to be done differently in places like the
                  terminal. I've learned that Rstudio is not very Jaws
                  friendly, but am not at all sure how to use Jaws and r
                  together. How can you view a whole script of r code at
                  once? In a terminal, doesn't one run code line by
                  line? How can all line be corrected and run at once
                  like in Rstudio? How do I code in r just using my
                  hearing and not eyesight? How do I create such things
                  as an rmarkdown file or a shiny app without Rstudio? I
                  looked through the threads in this list and found
                  things that are very helpful, but am not sure how to
                  use them without using my vision. Any help would very
                  much be appreciated.<o:p></o:p></p>
              </div>
              <div>
                <p class="MsoNormal"><o:p> </o:p></p>
              </div>
              <div>
                <p class="MsoNormal">Thank you,<o:p></o:p></p>
              </div>
              <div>
                <p class="MsoNormal">Nicholas<o:p></o:p></p>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
BlindRUG mailing list
<a class="moz-txt-link-abbreviated" href="mailto:BlindRUG@nfbnet.org">BlindRUG@nfbnet.org</a>
<a class="moz-txt-link-freetext" href="http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org">http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org</a>
To unsubscribe, change your list options or get your account info for BlindRUG:
<a class="moz-txt-link-freetext" href="http://nfbnet.org/mailman/options/blindrug_nfbnet.org/gjalt-jorn%40behaviorchange.eu">http://nfbnet.org/mailman/options/blindrug_nfbnet.org/gjalt-jorn%40behaviorchange.eu</a>
The list archive can be viewed at:
<a class="moz-txt-link-freetext" href="http://www.nfbnet.org/pipermail/blindrug_nfbnet.org">http://www.nfbnet.org/pipermail/blindrug_nfbnet.org</a>
More information and useful links about using R as a blind person can be obtained at:
<a class="moz-txt-link-freetext" href="http://R-Resources.massey.ac.nz">http://R-Resources.massey.ac.nz</a>

Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:
<a class="moz-txt-link-freetext" href="http://R-Resources.massey.ac.nz/lurn/front.html">http://R-Resources.massey.ac.nz/lurn/front.html</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>