Skip to content

Instantly share code, notes, and snippets.

@kazutan
Created April 22, 2017 17:15
Show Gist options
  • Save kazutan/8a077678d2557813bdc6cae2e0592605 to your computer and use it in GitHub Desktop.
Save kazutan/8a077678d2557813bdc6cae2e0592605 to your computer and use it in GitHub Desktop.
xaringanでの出力エリアを指定するセレクタ。詳しくはcssチャンクを。
---
title: "test"
output:
xaringan::moon_reader: default
---
```{css}
/* echo=true時のr出力ブロック */
.remark-slide-content > pre:first-of-type {
overflow: auto;
max-height: 1em;
}
/* echo=false時の出力ブロック */
.remark-slide-content > pre:only-of-type {
overflow-y: auto;
max-height: 4em;
}
/* echo=true時の出力ブロック */
.remark-slide-content > pre ~ pre {
overflow-y: auto;
max-height: 2em;
}
```
# output
```{r}
x <- 1
x <- 2
x <- 3
x <- 4
x <- 5
x <- 6
head(iris, 25)
```
---
# aaa
```{r, echo=FALSE}
head(iris, 22)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment