[BlindRUG] Switching from Doing with Eyesight to Doing Without
Gjalt-Jorn Peters
gjalt-jorn at behaviorchange.eu
Mon Apr 3 09:00:00 UTC 2017
Dear Nicholas (and Jonathan),
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:
```{r setup, echo=FALSE, message=FALSE}
require('BrailleR', quietly=TRUE);
require('sonify', quietly=TRUE);
```
This should suppress everything, I think. You could even build in some
graceful error handling quite easily using two chunks, e.g.:
```{r setup, echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
errorMessages <- NULL;
if (!require('BrailleR', quietly=TRUE)) {
errorMessages <- c(errorMessages, "BrailleR did not load successfully!");
}
if (!require('sonify', quietly=TRUE)) {
errorMessages <- c(errorMessages, "Sonify did not load successfully!");
}
```
```{r package-errors}
if (!is.null(errorMessages)) {
stop(paste0('I encountered the following errors when loading
packages:\n\n', paste0(errorMessages, collapse='\n')));
}
```
(didn't test, but should get you quite some ways towards a solution even
if a bit buggy :-))
Kind regards,
Gjalt-Jorn
*Gjalt-Jorn Peters* | http://behaviorchange.eu
Behavior change research | Health psychology
Intervention development | Applied social psychology [ GG
<http://greatergood.eu> OU <http://ou.nl> UM
<http://maastrichtuniversity.nl> }
On 2017-04-02 22:19, Godfrey, Jonathan via BlindRUG wrote:
>
> Hello Nicholas,
>
> 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.
>
> Your commands will be in a number of chunks but they are all run
> sequentially as you would with any other R script.
>
> In the end, your markdown file is a completely standalone record of
> the work you will do.
>
> Jonathan
>
> *From:*BlindRUG [mailto:blindrug-bounces at nfbnet.org] *On Behalf Of
> *Nicholas J via BlindRUG
> *Sent:* Monday, 3 April 2017 7:48 a.m.
> *To:* blindrug at nfbnet.org
> *Cc:* Nicholas J
> *Subject:* Re: [BlindRUG] Switching from Doing with Eyesight to Doing
> Without
>
> Dr. Godfrey,
>
> 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?
>
> Thank you,
>
> Nicholas
>
> On Tue, Mar 14, 2017 at 9:59 PM, Nicholas J <314nick15 at gmail.com
> <mailto:314nick15 at gmail.com>> wrote:
>
> Hello,
>
> 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.
>
> Thank you,
>
> Nicholas
>
>
>
> _______________________________________________
> BlindRUG mailing list
> BlindRUG at nfbnet.org
> http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org
> To unsubscribe, change your list options or get your account info for BlindRUG:
> http://nfbnet.org/mailman/options/blindrug_nfbnet.org/gjalt-jorn%40behaviorchange.eu
> The list archive can be viewed at:
> http://www.nfbnet.org/pipermail/blindrug_nfbnet.org
> More information and useful links about using R as a blind person can be obtained at:
> http://R-Resources.massey.ac.nz
>
> Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:
> http://R-Resources.massey.ac.nz/lurn/front.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170403/04cb150a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gg-logo - logo only, 46x45.png
Type: image/png
Size: 2054 bytes
Desc: not available
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170403/04cb150a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transparent pixel.gif
Type: image/gif
Size: 43 bytes
Desc: not available
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170403/04cb150a/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ou-logo - logo only, 23x45.png
Type: image/png
Size: 1081 bytes
Desc: not available
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170403/04cb150a/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: um-logo - logo only, 33x45.png
Type: image/png
Size: 1670 bytes
Desc: not available
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170403/04cb150a/attachment-0002.png>
More information about the BlindRUG
mailing list