Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Practicals/Lina/Assignment 1/Exercise1.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Exercise 1"
author: "Lina Kramer"
date: "1/11/2023"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

Fun facts:

+ I have four siblings.
+ I love Taylor Swift.
Binary file added Practicals/Lina/Assignment 1/Exercise1.pdf
Binary file not shown.
53 changes: 53 additions & 0 deletions Practicals/Lina/Assignment 1/Exercise2.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "Exercise2"
author: "Lina Kramer"
date: "1/11/2023"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## Monte Carlo simulation

```{r echo=TRUE, message=FALSE, warning=FALSE}
set.seed(15)
library(dplyr)
library(tidyr)
library(plotrix)

data <- replicate (100, rnorm(200)) %>% as.data.frame()# 100 samples from a standard normal distribution n = 200

data <- data %>% pivot_longer(cols=everything(), names_to = "set", values_to = "val")

sumdata <- data %>% # means, bias, standard errors, CIs
group_by(set) %>%
summarise_each(funs(mean,
bias= 0-mean,
se=sd(.)/sqrt(n()),
lower = mean - qnorm(0.975)*sd(.)/sqrt(n()),
upper= mean + qnorm(0.975)*sd(.)/sqrt(n())))


sumdata

```
```{r echo=TRUE, warning=FALSE}
library(ggplot2)
library(gghighlight)

pd <- position_dodge(0.78)

ggplot(sumdata, aes(x=mean, y = set)) +
#draws the means
geom_point(position = pd) +
#draws the CI error bars
geom_errorbar(data=sumdata, aes(xmin=mean-2*se, xmax=mean+2*se), width=.1, position = pd)+
geom_vline(xintercept = 0, color ="red")

```
```{r echo=TRUE}
sumdata %>% filter(lower>0 | upper <0)
```

Binary file added Practicals/Lina/Assignment 1/Exercise2.pdf
Binary file not shown.
36 changes: 36 additions & 0 deletions Practicals/Lina/Assignment 2/Exercise2.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Exercise2"
author: "Lina Kramer"
date: "1/16/2023"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Exercise

Design a study that:

a. Does something that requires RNG
b. Fixes the RNG seed
c. Replicates the results
d. Generates an reproducible archive/reprex/markdown
e. Will run on my machine without trouble (package installs may be excused)
f. Communicates the info of your session

```{r echo=TRUE, warning=FALSE}
set.seed(15)

a <- sample(1:10, size = 50, replace = TRUE)
b <- replicate(1, a)

summary(a)
summary(b)
```

```{r}
sessionInfo()
```

Binary file added Practicals/Lina/Assignment 2/Exercise2.pdf
Binary file not shown.
110 changes: 110 additions & 0 deletions Practicals/Lina/Assignment 3/Exercise1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@

\documentclass[aspectratio=169]{beamer} %16:9


\usetheme[]{default}
\usecolortheme{beaver}
\usepackage{tikz}
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{graphicx}

\beamertemplatenavigationsymbolsempty %suppress navigation bar
\definecolor{light-gray}{gray}{0.1}

%TITLEPAGE
\title[Example] {Example document to recreate with \texttt{beamer} in \LaTeX}

\author[Your Name]
{
Lina Kramer
}

\date[MLRPS]
{\vspace{.5 in}\\ FALL 2021 \\ Markup Languages and Reproducible Programming in Statistics \vskip6mm}



\begin{document}
\titlepage

\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}

%%%%%%%%%
\section{Working with equations}
\begin{frame}
\frametitle{Working with equations}
We define a set of equations as
\begin{equation}
a=b+c^2,
\end{equation}
\begin{equation}
a-c^2=b,
\end{equation}
\begin{equation}
\text{left side} = \text{right side},
\end{equation}
\begin{equation}
\text{left side} + \text{something} \geq \text{right side},
\end{equation}
for all $\text{something} > 0$.
\end{frame}

%%%%%%%%%%
\subsection{Aligning the same equations}
\begin{frame}
\frametitle{Aligning the same equations}
Aligning the equations by the equal sign gives a much better view into the placements of the separate equation components.
\begin{align}
a&=b+c^2,\\
a-c^2&=b,\\
\text{left side} &= \text{right side},\\
\text{left side} + \text{something} & \geq \text{right side},
\end{align}
\end{frame}

%%%%%%%%%%
\subsection{Omit equation numbering}
\begin{frame}
\frametitle{Omit equation numbering}
Alternatively, the equation numbering can be omitted.
\begin{align*}
a&=b+c^2\\
a-c^2&=b\\
\text{left side} &= \text{right side}\\
\text{left side} + \text{something} & \geq \text{right side}
\end{align*}
\end{frame}

%%%%%%%%%%
\subsection{Ugly alignment}
\begin{frame}
\frametitle{Ugly alignment}
Some components do not look well, when aligned. Especially equations with different heights and spacing. For example,
\begin{align}
E&=mc^2,\\
m&=\frac{E}{c^2},\\
c&=\sqrt{\frac{E}{m}}.
\end{align}
Take that into account.
\end{frame}

%%%%%%%%%%
\section{Discussion}
\begin{frame}
\frametitle{Discussion}
This is where you'd normally give your audience a recap of your talk, where you could discuss e.g. the following
\begin{itemize}
\item Your main findings
\item The consequences of your main findings
\item Things to do
\item Any other business not currently investigated, but related to your talk
\end{itemize}
\end{frame}


\end{document}

27 changes: 27 additions & 0 deletions Practicals/Lina/Assignment 5/DogsofZurich.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: |
![](sticker.png)
Dogs of Zurich
author: "Lina Kramer"
date: "1/16/2023"
output: beamer_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

```{r}
require(plotly)
require(DT)
data <- read.csv("C:/Users/linak/Downloads/20151001hundehalter.csv")
```

## Who are they?

- Zurich's cutest inhabitants





30 changes: 30 additions & 0 deletions Practicals/Lina/Assignment 5/DogsofZurich.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex 2022.3.23) 16 JAN 2023 16:53
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**DogsofZurich.tex
(./DogsofZurich.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-02-24>

! LaTeX Error: File `beamer.cls' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)

Enter file name:
! Emergency stop.
<read *>

l.8 \usepackage
{pgfpages}^^M
Here is how much of TeX's memory you used:
29 strings out of 480236
599 string characters out of 5894214
284331 words of memory out of 5000000
18082 multiletter control sequences out of 15000+600000
469259 words of font info for 28 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
19i,0n,29p,91b,17s stack positions out of 5000i,500n,10000p,200000b,80000s

! ==> Fatal error occurred, no output PDF file produced!
Loading