0

Maybe this is a stupid question, but I couldn't find an answer and I'm newbie using r-markdown.

I created a script in R for some statistical calculations and graphics. After finishing the script, my tutor told me it would be right that R script generates a report in pdf.

I tried to export the result with different methods inside .R file but finally I discovered that the best way to create a report was r-markdonw.

However, this R-script is to be used in a bash file to automate the process... Example:

  1. Java program generates files
  2. R script takes these files and do some statistical calculations.
  3. Generate a clear report in pdf or html.

My question is... How can I run a .RMD file in bash script ?

Edit:

Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_a
7
  • 2
    Rscript -e 'rmarkdown::render(…)' Commented Oct 20, 2016 at 23:41
  • @hrbrmstr, please post as answer (or find a duplicate - there might be one out there ...) Commented Oct 20, 2016 at 23:44
  • I'm gd with that as a dup Commented Oct 20, 2016 at 23:58
  • @hrbrmstr I did what you said me and --> Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available). Commented Oct 21, 2016 at 0:14
  • Well, you need to install pandoc then. Commented Oct 21, 2016 at 1:37

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.