我非常欣赏RMarkdown中的"code_folding"功能.但是,我真正需要的是让代码始终显示并切换输出上的显示.
---
title: "test file"
author: "dayne"
date: "June 10, 2016"
output:
html_document:
code_folding: hide
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Here is a basic example.
```{r}
3 + 4
```
Run Code Online (Sandbox Code Playgroud)
有没有办法切换输出而不是代码?我想到的最好(但不是理想的)解决方案是添加collapse=TRUE到块中,但代码和输出仍然同时显示.
链接到已编译的文档:http://rpubs.com/daynefiler/188408