Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Getting started with R Markdown

Installation of R package rmarkdown (as usual)

Define default settings in a R markdown document

See https://yihui.name/knitr/options/ for all possible options.

Default settings for R chunks used in this R Markdown file:

knitr::opts_chunk$set(eval = TRUE, echo = FALSE, message = FALSE, warning = FALSE)

Meaning of default settings:

  • eval = TRUE (evaluate R chunks)
  • echo = FALSE (do not print R commands)
  • message = FALSE (do not print messages)
  • warning = FALSE (do not print warnings)

Load data

Report on age

Include figures

Histogram for age

A table with kable from the knitr library to show the menoposal status by age group:

Group Frequency
Above or equal 50 418
Below 50 268
Information on R Markdown

Homepage

http://rmarkdown.rstudio.com

Generate Word files with R Markdown

http://rmarkdown.rstudio.com/word_document_format.html

Generate PDF files with R Markdown

http://rmarkdown.rstudio.com/pdf_document_format.html