Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

BOOK: Popper, K. R. (1935) Logik der Forschung. Springer, Wien

 

LaTeX and RStudio

 

Brief introduction to LaTeX

...

LaTex in RStudio

First, install the knitr package:

> install.packages("knitr")

Open a new file of type "R Sweave", it will automatically contain:

\documentclass{article}

\begin{document}

\end{document}

This is the basic of a LaTeX document. You can write something like:

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage{framed}

\usepackage{graphicx}

%\usepackage{hyperref}

%\usepackage[hdivide={2cm, *, 2cm}, vscale=0.85]{geometry}

%\usepackage[backend=bibtex]{biblatex}

%\usepackage{listings}

 

\title{Correlation analysis of the wildlings' deaths and the rise of white walkers}

\author{John Snow}

\date{}

\begin{document}

\maketitle

\section{Introduction}

\end{document}

 and try to compile the

 

 

Sweave and knitr

...

You can of course copy-paste your code in LaTeX (using e.g. the package listings for syntax formatting) and save graphics to include, but here the advantage is: 

This enables the creation of dynamic reports that are updated automatically if data or analysis changes.

 

 

...

This means Sweave is very useful for "on going" projects, where things are expected to change, as well as quick notes on something you are working on.

...

https://support.rstudio.com/hc/en-us/articles/200552056-Using-Sweave-and-knitr

 

Setting knitr as default for Rnw files

...

Ref:

https://support.rstudio.com/hc/en-us/articles/200532247

...