Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/docs/knitr-spin.R
3557 views
1
#' ---
2
#' title: "A report generated from a pure R script"
3
#' format: html
4
#' ---
5
#'
6
#' This is a report generated by `knitr::spin()`.
7
#'
8
#' ## Code block {#block}
9
#'
10
#' Let's try some **knitr** options:
11
12
#| echo: false
13
#| fig-with: 7
14
# This is a normal R comment.
15
plot(cars)
16
17
#' ## Inline value {#inline}
18
#'
19
#' Now write an inline value. We know the value of $\pi$ is
20
# /*
21
# fmt: skip
22
# */
23
{{ pi }}
24
#' .
25
#'
26
#' Finally please note that all roxygen comments are
27
#' optional. You do not need chunk options, either,
28
#' unless you want more control over the output
29
#' elements such as the size of plots.
30
31
# /* Write comments between /* and */ like C comments:
32
Sys.sleep(60)
33
# */
34
35