我如何在github中看到.rmd的输出?

Sha*_*ala 18 r github rstudio r-markdown

我正在使用R编程进行数据分析.我希望我的文件在github上.我无法弄清楚为什么github没有显示.rmd文件的输出.

这是我的github存储库数据分析实践中的文件的链接

我希望包含绘图的输出显示在github上.

hrb*_*str 49

代替:

output: html_document
Run Code Online (Sandbox Code Playgroud)

做了:

output: rmarkdown::github_document
Run Code Online (Sandbox Code Playgroud)

(假设您安装了最新的rmarkdown,如果您正在使用RStudio,那么您应该使用它 - 我怀疑您是 - 并保持更新或定期更新软件包).

它将创建Exploring_one_variable.md图像并将其渲染为文件.

当您浏览到该markdown文件时,图像将呈现.

另一种方法是使用:

output: 
  html_document:
    keep_md: true
Run Code Online (Sandbox Code Playgroud)

并且它将呈现给两者Exploring_one_variable.md,Exploring_one_variable.html因此你将拥有两个世界中最好的,没有前者提供的本地github-esque预览.

您可以获得更高级的功能,并将以下内容作为Rmd中的第一个代码部分:

```{r, echo = FALSE}
knitr::opts_chunk$set(
  fig.path = "README_figs/README-"
)
```
Run Code Online (Sandbox Code Playgroud)

这会将数字放在您选择的目录中.

您可以在此处看到此操作,因为它README.mdknitrREADME.Rmd同一目录中生成的.