#> [1] 2
#> [1] 4
1:10
opts_template
knitr::opts_template$set(skip = list(eval = FALSE), b = list(results = "markup",
prompt = TRUE))
ref.label = 'a'
Ignore chunk options on chunk a
:
1 + 1
## [1] 2
2 + 2
## [1] 4
ref.label = I('a')
Inherit chunk options from chunk a
:
#> [1] 2
#> [1] 4
ref.label = 'a'
and opts.label = TRUE
Inherit chunk options from chunk a
:
#> [1] 2
#> [1] 4
ref.label = 'a'
and opts.label = 'b'
Inherit chunk options from template b
and then chunk b
:
> 1 + 1
> 2 + 2
ref.label = c('b', 'a')
and opts.label = TRUE
Inherit chunk options from chunk b
(no output) and a
(no source), so you see nothing below:
ref.label = I(c('b', 'a'))
Same as the previous section---you see nothing below:
ref.label = I(c('b', 'a'))
and echo = TRUE
Inherit chunk options from chunk b
(no output) and a
(no source), and then override with echo = TRUE
:
> 1:10
> 1 + 1
> 2 + 2
ref.label = c('b', 'a')
and opts.label = 'a'
Inherit code from chunk b
and a
, and chunk options from chunk a
(no source):
#> [1] 1 2 3 4 5 6 7 8 9 10
#> [1] 2
#> [1] 4
ref.label = c('b', 'a')
and opts.label = 'skip'
Inherit code from chunk b
and a
, and chunk options from template skip
(no evaluation):
1:10
1 + 1
2 + 2
ref.label = I(c('b', 'a'))
and opts.label = 'skip'
Inherit code from chunk b
and a
, and chunk options from template skip
(ignore I()
in ref.label
since opts.label
is not empty):
1:10
1 + 1
2 + 2
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.