[BlindRUG] Question about R Markdown

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Tue Mar 23 08:58:40 UTC 2021


Hello Niels,

You should be able to "print" from the graph window that opens in R to your View Plus embosser. You will need to watch the size of the window is a good match for your braille paper. You might also make sure that the amount of colour is minimised in your graphics; that is, do not use any "fill" in your histograms for example unless it is a very light colour. (Too much shading will destroy the paper.

I haven't tested printing from HTML as yet, but I wouldn't hope for much. If I was using an embosser in conjunction with a R markdown file, then I'd probably save the graphs in a specified file. In Windows, that can be done with savePlot().

HTH
Jonathan



-----Original Message-----
From: BlindRUG <blindrug-bounces at nfbnet.org> On Behalf Of Niels Luithardt via BlindRUG
Sent: Tuesday, 23 March 2021 9:45 PM
To: Blind R Users Group <blindrug at nfbnet.org>
Cc: Niels Luithardt <niels.luithardt at googlemail.com>
Subject: Re: [BlindRUG] Question about R Markdown

Hello jooyoung,

thank you very much for your help and the file. I'm starting to understand how this all works through the comments.

I have one more question about the tactileR package. I don't have a fuser for swell paper. I have a braille Embosser from ViewPlus Technologies. Can I print out a histogram like this? For that I would need a .brl file or?

Best regards

Niels


2021-03-21 17:23 GMT+01:00, Liz Hare via BlindRUG <blindrug at nfbnet.org>:
> Hi JooYoung,
>
> I did not know about tactileR and I’m very excited about finding out 
> if it will work with my embosser. Thank you!
>
> Liz
>
>
>
>> On Mar 21, 2021, at 11:54 AM, JooYoung Seo via BlindRUG 
>> <blindrug at nfbnet.org> wrote:
>>
>> Hello,
>>
>> I found some errors in your code. You forgot to enclose the main 
>> title, x and y labels with quotations.
>>
>> I hope the following lines of codes could help you.
>>
>>
>> dice <- sample(1:6, 50, replace = TRUE)
>> table(dice)
>> round(table(dice) / 50, digits = 3)
>>
>> # Use BrailleR to get alternative text:
>> library(BrailleR)
>>
>> VI(
>>    hist(dice,
>>        main = "dice role",
>>        xlab = "Number of dice", ylab = "Number of throws when rolling 
>> the dice",
>>        col = "blue"
>>    )
>>    # Comment out the following line; otherwise, BrailleR cannot treat 
>> this object:
>>    # box()
>> )
>>
>> # Create tactile graph using tactileR package developed by JooYoung Seo.
>> # Install package:
>> if (!require(remotes)) {
>>    install.packages("remotes")
>> }
>>
>> remotes::install_github("jooyoungseo/tactileR")
>>
>> # Loading tactile package:
>> library(tactileR)
>>
>> # Create tactile graphic by surrounding between two functions like 
>> below. The arguments used in this example are all given by default:
>> brl_begin(file = "tactile.pdf", pt = 11, paper = "special", font = 
>> "BRL") hist(dice,
>>    main = "dice role",
>>    xlab = "Number of dice", ylab = "Number of throws when rolling the 
>> dice",
>>    col = "blue"
>> )
>> box()
>> brl_end()
>> # The braille ready-to-print pdf version will be created in your 
>> working directory. Print it out and run the swell touch paper through 
>> swell form heating machine.
>> # Note: This function optimizes for both 1111 and 118.5 swell touch 
>> papers. When printing a generated braille pdf, just remember two
>> things:
>> # 1. check “Fit” in the print dialog box (the shortcut key is ALT+F).
>> # 2. Check “Landscape” in the print dialog box as well.
>> # For boxplot, you do not need to check the “Landscape,” just leave 
>> it as a “Portray.” However, please check the “Fit” all the time.
>>
>>
>>> On 3/21/21, Niels Luithardt via BlindRUG <blindrug at nfbnet.org> wrote:
>>> Hi, I modified my R code and used the histogram function. I hope 
>>> this is correct now.
>>>
>>> dice<-sample(1:6,50,replace=TRUE)
>>> table(dice)
>>> round(table(dice)/50,digits = 3)
>>> hist(dice,main=dice role,
>>> xlab=Number of dice,ylab=Number of throws when rolling the dice,
>>> col=blue)
>>> box()
>>>
>>>
>>> The question is how do I embed the code back into the .rmd. Is the 
>>> fig.cap in the file absolutely necessary?
>>>
>>> What is the best way to plot histograms if you want to use brailler?
>>>
>>> Kind Regards
>>>
>>> Niels
>>>
>>>
>>> 2021-03-21 10:26 GMT+01:00, Niels Luithardt
>>> <niels.luithardt at googlemail.com>:
>>>> Hello Ben,
>>>>
>>>> About your questions:
>>>>
>>>> You ask if it is a script file.
>>>>
>>>> Yes, my example exists as an .r file. It has the name dicerole.r 
>>>> .But I don't know if that is important. To test the code, I copy 
>>>> the code from the file and paste it directly into the R terminal. I 
>>>> know that I could also start the file with the source command.
>>>>
>>>> You ask how I use R.
>>>>
>>>> As I indicated I use the R terminal, I don't use R Studio or any 
>>>> other development environment. That may come later.
>>>>
>>>> On the topic of output format:
>>>>
>>>> To start, html is just fine. I want to get as much information as 
>>>> possible from the html file. But in principle other output formats 
>>>> are interesting for me.
>>>>
>>>> E.g. I would like to print the graphic created with the help of R 
>>>> with a Braille embosser. Is that possible in a quick and easy way?
>>>>
>>>> Can the graphics be automatically generated as .stl and printed 
>>>> with a 3D printer?
>>>>
>>>> Can the data be sonified?
>>>>
>>>> I want to find out what is possible with Brailler. I want to test 
>>>> the limits. I want to find out what else is possible.
>>>>
>>>> Regards
>>>>
>>>> Niels
>>>>
>>>>
>>>> 2021-03-20 15:30 GMT+01:00, Ward, Elizabeth - wardex via BlindRUG
>>>> <blindrug at nfbnet.org>:
>>>>> Hi Niels,
>>>>>
>>>>> We need to know a few things about how you are using R before we 
>>>>> can help with this. Is this a script file? Are you using the 
>>>>> console or RStudio or emacs or something else? Also, would you 
>>>>> like your output to be HTML?
>>>>>
>>>>> Best Wishes,
>>>>> Ben
>>>>>
>>>>> -----Original Message-----
>>>>> From: BlindRUG <blindrug-bounces at nfbnet.org> On Behalf Of Niels 
>>>>> Luithardt via BlindRUG
>>>>> Sent: Friday, March 19, 2021 5:45 PM
>>>>> To: blindrug at nfbnet.org
>>>>> Cc: Niels Luithardt <niels.luithardt at googlemail.com>
>>>>> Subject: [BlindRUG] Question about R Markdown
>>>>>
>>>>> CAUTION: This email originated from outside of JMU. Do not click 
>>>>> links or open attachments unless you recognize the sender and know 
>>>>> the content is safe.
>>>>> ________________________________
>>>>>
>>>>> Hello,
>>>>>
>>>>> I have a question about RMarkdown:
>>>>>
>>>>> I want to create a .rmd file and I have thought of the following 
>>>>> example for
>>>>> it:
>>>>>
>>>>> dice<-sample(1:6,50,replace=TRUE)
>>>>> table(dice)
>>>>> round(table(dice)/50,digits = 3)
>>>>> barplot(table(dice),width=1,col="blue", 
>>>>> cex.axis=2.8,cex.names=2.8) What must be the rest of the markdown 
>>>>> file for my code to be processed successfully?
>>>>>
>>>>> I would be very pleased about answers!
>>>>>
>>>>> Kind regards
>>>>>
>>>>> Niels
>>>>>
>>>>> _______________________________________________
>>>>> BlindRUG mailing list
>>>>> BlindRUG at nfbnet.org
>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__nfbnet.org_mai
>>>>> lman_listinfo_blindrug-5Fnfbnet.org&d=DwICAg&c=eLbWYnpnzycBCgmb7vC
>>>>> I4uqNEB9RSjOdn_5nBEmmeq0&r=cgRfASaJjCZgA7NTWNKTNw&m=3pmt0JY7e5lzha
>>>>> 0G4M99yBuWPngkFrKW0Ujq_v9eJmw&s=_nq82wzfY9Q5Ehgd72HpQ_3YReGcypIbbT
>>>>> t2z0Hy1xA&e= To unsubscribe, change your list options or get your 
>>>>> account info for
>>>>> BlindRUG:
>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__nfbnet.org_mai
>>>>> lman_options_blindrug-5Fnfbnet.org_wardex-2540jmu.edu&d=DwICAg&c=e
>>>>> LbWYnpnzycBCgmb7vCI4uqNEB9RSjOdn_5nBEmmeq0&r=cgRfASaJjCZgA7NTWNKTN
>>>>> w&m=3pmt0JY7e5lzha0G4M99yBuWPngkFrKW0Ujq_v9eJmw&s=a7gQI0ZI-r7aA4YZ
>>>>> yRJd4KZgjZAhwKJkqbUgsXhKTAg&e= The list archive can be viewed at:
>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nfbnet.org
>>>>> _pipermail_blindrug-5Fnfbnet.org&d=DwICAg&c=eLbWYnpnzycBCgmb7vCI4u
>>>>> qNEB9RSjOdn_5nBEmmeq0&r=cgRfASaJjCZgA7NTWNKTNw&m=3pmt0JY7e5lzha0G4
>>>>> M99yBuWPngkFrKW0Ujq_v9eJmw&s=9iDmsJRYo3hz-CAviCCXMsnONwQmKPiurYpMd
>>>>> XC9rGk&e= More information and useful links about using R as a 
>>>>> blind person can be obtained at:
>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__R-2DResources.
>>>>> massey.ac.nz&d=DwICAg&c=eLbWYnpnzycBCgmb7vCI4uqNEB9RSjOdn_5nBEmmeq
>>>>> 0&r=cgRfASaJjCZgA7NTWNKTNw&m=3pmt0JY7e5lzha0G4M99yBuWPngkFrKW0Ujq_
>>>>> v9eJmw&s=_Zz9WJWeycAyzA9nwZ_Zi4KGESGHzYCvPrlybLYUQCA&e=
>>>>>
>>>>> Look for help using R commands by reading the accessible e-book 
>>>>> "Let's Use R Now" compiled by Jonathan Godfrey at:
>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__R-2DResources.
>>>>> massey.ac.nz_lurn_front.html&d=DwICAg&c=eLbWYnpnzycBCgmb7vCI4uqNEB
>>>>> 9RSjOdn_5nBEmmeq0&r=cgRfASaJjCZgA7NTWNKTNw&m=3pmt0JY7e5lzha0G4M99y
>>>>> BuWPngkFrKW0Ujq_v9eJmw&s=BIraGqCNdIrXzsWolYwFnvazaAksIcxDABJj1ads4
>>>>> i4&e=
>>>>>
>>>>> _______________________________________________
>>>>> 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/niels.luitha
>>>>> rdt%40googlemail.com 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
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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/sjysky%40gmail
>>> .com
>>> 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
>>>
>>
>>
>> --
>> --------------------
>>  JooYoung Seo, CPACC
>>  Ph.D. Candidate (ABD),
>>  RStudio's Trusted Data-Science Instructor
>>  Learning, Design, and Technology
>>  Learning and Performance Systems
>>  The Pennsylvania State University
>>  Site: https://jooyoungseo.com/
>>  Phone: +1 (814) 777-5825
>>  E-mail: jzs323 at psu.edu
>>
>> _______________________________________________
>> 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/doggene%40earthlink.net
>> 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
>
>
> _______________________________________________
> 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/niels.luithardt%40googlemail.com
> 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
>

_______________________________________________
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/a.j.godfrey%40massey.ac.nz
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


More information about the BlindRUG mailing list