[BlindRUG] Is there any way that we could make RmdBatch file work?

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Tue Jun 13 09:53:03 UTC 2017


Hello JooYoung et al.,


The MakeBatch() command does one of two things. If you do not put in  a filename, it creates a set of files in the current working directory, one of which is RmdBatch.bat

The purpose of RmdBatch.bat is to allow the user the chance to use the dos prompt to issue the command
    RmdBatch.bat test.Rmd
In which case the file test.Rmd is compiled using rmarkdown::render()

The original intention was to allow users to move the RmdBatch.bat file to somewhere on the path and have the above line issued from any folder without needing to create the batch files again and again. Experiments to date do not convince me that this works in every instance.

If however the user chooses a filename for MakeBatch(), then the batch file created is tailored to the file specified and either runs rmarkdown::render() for Rmd files, or the standard command line for batch processing R script files. In this case, you would want the batch file to sit alongside the Rmd or R file it is linked to.

I definitely had RmdBatch.bat working when I first added it to the BrailleR package. I accept that it might not now be working as well, but I'm not convinced anyone wants the originally intended dos prompt way of working anyway.

Your desire to process all Rmd files in a folder is a different problem and would need something different added to the MakeBatch() command. I think it is easily achieved so I'll add it to the to-do list on GitHub.

Jonathan





From: BlindRUG [mailto:blindrug-bounces at nfbnet.org] On Behalf Of JooYoung Seo via BlindRUG
Sent: Tuesday, 13 June 2017 1:40 p.m.
To: 'Blind R Users Group'
Cc: JooYoung Seo
Subject: [BlindRUG] Is there any way that we could make RmdBatch file work?

  Dear Dr. Godfrey,

  I hope this email finds you well.

  I wish I could meet in person in Florida, but I am so sorry I won't be able to make it because of my project here at Penn State during summer.
  I hope I can see you next time.

  I am writing this to ask you if there would be any way we could make RmdBatch file work in anywhere like the RBatch file.

  As you know, currently it seems really tricky transfer backslash escape character that is given from %1 argument in batch file into slash.
  I have tried to several things I could do, but all results were not satisfactory.

  Alternatively, I am using my batch file for rmarkdown file like the below:

##Batch file begins
C:\PROGRA~1\R\R-34~1.0\bin\RScript.exe -e "rmarkdown::render(grep('*.Rmd', list.files(), value=T))"
##Batch file ends

However, it works when there is only one .Rmd file in the current working directory.
  As you see here, it is just provisional solution.

  Do you know how we could make it work for any executed R markdown file?

  Your help would be greatly appreciated.

  Sincerely,

  JooYoung


       JooYoung Seo
--------------------
  Doctoral Student,
  Learning, Design, and Technology
  Learning and Performance Systems
  The Pennsylvania State University

[Image removed by sender.]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon>

Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170613/fd37e3cd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 350 bytes
Desc: image001.jpg
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20170613/fd37e3cd/attachment.jpg>


More information about the BlindRUG mailing list