Introduction
Note that the setup chunk above is not visible in the final document
since the chunk option include=FALSE
. In this setup chunk
we set the default value for the option echo
to
FALSE
, meaning that code is hidden by default.
Also check out the header, in which we explicitly set
title
, date
, and author
- the
result of this can be seen in the rendered document. To comply with the
respective tasks we added the specifications toc: true
and
toc_float: true
to the html_document
to add
the floating table of contents, and code_download: true
to
add the code download button. To the pdf_document
call we
only added toc: true
to get the table of contents.
A second level heading
Again some text. Here is the first chunk. The code is shown in the
rendered document because we set the chunk option
echo=TRUE
, and so is the output produced by the code
because the chunk option include
is set the
TRUE
by default:
vector_random_numbers <- rnorm(
n = 12, mean = 5, sd = 2)
vector_random_numbers
## [1] 5.9408644 1.4956974 7.4589696 3.7737553 4.6029126 1.5734073 4.4312455
## [8] 0.6578314 2.5239020 1.5425166 5.9722831 4.4491438
A visualization
Here we produce the desired ggplot (the code for which remains hidden
because we did not deviate from the default value of echo
,
which we set to FALSE
in the setup chunk.)
Using Netlify Drop
The document was published using Netlify Drop, as explained in
the slides. This is the reason the file is called
index.Rmd
: Netlify Drop only works if a
html
-file called index.html
is included in the
uploaded directory.
LS0tCnRpdGxlOiAiQSBwb3NzaWJsZSBzb2x1dGlvbiIKYXV0aG9yOiAiQ2xhdWRpdXMiCmRhdGU6ICI0LzYvMjAyMiIKb3V0cHV0OgogIGh0bWxfZG9jdW1lbnQ6CiAgICB0b2M6IHllcwogICAgdG9jX2Zsb2F0OiB5ZXMKICAgIGNvZGVfZG93bmxvYWQ6IHllcwogICAgdGhlbWU6ICJzcGFjZWxhYiIKICBwZGZfZG9jdW1lbnQ6CiAgICB0b2M6IHllcwotLS0KCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQprbml0cjo6b3B0c19jaHVuayRzZXQoZWNobyA9IEZBTFNFKSAjIEhpZGVzIGNvZGUgYnkgZGVmYXVsdApgYGAKCiMgSW50cm9kdWN0aW9uCgpOb3RlIHRoYXQgdGhlIHNldHVwIGNodW5rIGFib3ZlIGlzIG5vdCB2aXNpY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