Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Vignettes are documents used to share some documentations about packages. R Notebooks are similar as scripts. In addition they offer the tools to add more textual information and execute some R code.

What is R Markdown

Markdown is a markup languages; it allows to format text using a set of well established symbol. Unlike HTML and other languages, Markdown relies on sequences of characters. Markdown relies on some plain-text syntax to format part of your text. R Markdown is a version of this markup language to allow within R Studio the creation of documents, such web pages, books and scientific articles.

Example of R Markdown

This is a basic example of R Markdown. It shows a title and the output as an html notebook. Some titles, paragraphs and R snippet code have been included within the plain-text document.

The output of the html notebook is shown below. It appears the # characters formats the Heading 1.

Packages

You will need to install several packages and create the file structure required to write a vignette.

# install the package R Markdown and knitr
install.packages("rmarkdown")
install.packages("knitr")

#create the folder structure
usethis::use_vignette("my-vignette")

Additional reading list

  • No labels