Shankar Pandala Shankar Pandala - 1 year ago 111
R Question

How can i see output of .rmd in github?

I am practicing data analysis using R programming. I want my files to be on github. I am unable to figure out why github is not showing the output of .rmd files.

Here is the link to the file in my github repository Data Analysis Practice

I want the output including plots to be shown on github.

Answer Source

Instead of:

output: html_document

make it:

output: rmarkdown::github_document

(assuming you have the latest rmarkdown installed which you should if you're using RStudio — which I suspect you are — and keep it updated or update packages regularly).

It will create and render the images as files.

When you browse to that markdown file, the images will render.

An alternative is to use:

    keep_md: true

and it will render to both and Exploring_one_variable.html so you'll have the best of both worlds without the local github-esque preview that the former provides.

You can get fancier and put something like the following as the first code section in the Rmd:

```{r, echo = FALSE}
  fig.path = "README_figs/README-"

which will put the figures in a directory of your choosing.

You can see this in action here as the was generated with knitr from the README.Rmd in the same directory.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download