\newcommand{\points}[1] {\begin{flushright}\textbf{#1}\end{flushright}}

# knitr::opts_chunk$set(echo = FALSE, results = 'hide')
#knitr::opts_chunk$set(concordance=TRUE)
knitr::knit_hooks$set(hook_convert_odg = rmdhelp::hook_convert_odg)
# write the parameters to file
b_params_to_file <- FALSE
# check whether seed is set and output it to a file
s_this_rmd_file = basename(ifelse(rstudioapi::isAvailable(), 
                         rstudioapi::getSourceEditorContext()$path, 
                         whereami::thisfile()))
if (is.null(params$seed)){
  stop(" ** Error parameter seed has not been set.")
} else {
  set.seed(params$seed)
  s_params_file <- paste0(format(Sys.time(), '%Y%m%d%H%M%S'), "_params_", s_this_rmd_file, ".txt", collapse = "")
  if (b_params_to_file) dput(params, file = s_params_file)
}
# Assign Points for Q1
lPointsQ1 <- list(TaskA = 0,
                  TaskB = 0,
                  TaskC = 0,
                  TaskD = 0)
nPointQ1Total <- sum(unlist(lPointsQ1))
# Assign Points for Q2
lPointsQ2 <- list(TaskA = 0,
                  TaskB = 0,
                  TaskC = 0,
                  TaskD = 0)
nPointQ2Total <- sum(unlist(lPointsQ2))
# Assign Points for Q3
lPointsQ3 <- list(TaskA = 0,
                  TaskB = 0,
                  TaskC = 0,
                  TaskD = 0)
nPointQ3Total <- sum(unlist(lPointsQ3))
# Assign Points for Q4
lPointsQ4 <- list(TaskA = 0,
                  TaskB = 0,
                  TaskC = 0,
                  TaskD = 0)
nPointQ4Total <- sum(unlist(lPointsQ4))
# Assign Points for Q4
lPointsQ5 <- list(TaskA = 0,
                  TaskB = 0,
                  TaskC = 0,
                  TaskD = 0)
nPointQ5Total <- sum(unlist(lPointsQ5))
nPointOverallTotal <- nPointQ1Total + nPointQ2Total + nPointQ3Total + nPointQ4Total + nPointQ5Total

\thispagestyle{empty}

\fcolorbox{white}{white}{ \centering \parbox[t]{1.0\linewidth}{ \fontsize{12pt}{20pt}\selectfont % \vspace*{0.5cm} %

Peter von Rohr \\ Institute of Agricultural Sciences\\ D-USYS\\ ETH Zurich

    \vspace*{0.5cm} 
}

}

\vspace*{2cm}

\fcolorbox{white}{white}{ \parbox[t]{1.0\linewidth}{ \centering \fontsize{25pt}{40pt}\selectfont % \vspace*{0.2cm} 751-7602-00 V \ Solutions for Exam in \ Applied Statistical Methods \ in Animal Sciences \ Summer Semester 2022

    \vspace*{0.7cm} % Space between the end of the title and the bottom of the grey box
}

}

\vspace*{1cm}

\begin{tabular}{p{3cm}p{6cm}} Date: & r params$examdate \ & \ & \ Name: & \ & \ & \ Legi-Nr: & \ \end{tabular}

\vspace{5ex} \begin{center} \begin{tabular}{|p{3cm}|c|c|} \hline Problem & Maximum Number of Points & Number of Points Reached\ \hline 1 & r nPointQ1Total & \ \hline 2 & r nPointQ2Total & \ \hline 3 & r nPointQ3Total & \ \hline 4 & r nPointQ4Total & \ \hline 5 & r nPointQ5Total & \ \hline Total & r nPointOverallTotal & \ \hline \end{tabular} \end{center}

\vspace{0.5cm}

\textit{Questions in German are in italics}

\clearpage \pagebreak

Problem 1:

\textit{}

\begin{enumerate} \item[a)]

\textit{}

\end{enumerate} \points{r lPointsQ1$TaskA}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[b)]

\textit{}

\end{enumerate} \points{r lPointsQ1$TaskB}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[c)]

\textit{}

\end{enumerate} \points{r lPointsQ1$TaskC}

Solution

\clearpage \pagebreak

Problem 2:

\textit{}

\begin{enumerate} \item[a)]

\textit{}

\end{enumerate} \points{r lPointsQ2$TaskA}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[b)]

\textit{}

\end{enumerate} \points{r lPointsQ2$TaskB}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[c)]

\textit{}

\end{enumerate} \points{r lPointsQ2$TaskC}

Solution

\clearpage \pagebreak

Problem 3:

\textit{}

\begin{enumerate} \item[a)]

\textit{}

\end{enumerate} \points{r lPointsQ3$TaskA}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[b)]

\textit{}

\end{enumerate} \points{r lPointsQ3$TaskB}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[c)]

\textit{} \end{enumerate} \points{r lPointsQ3$TaskC}

Solution

\clearpage \pagebreak

Problem 4:

\textit{}

\begin{enumerate} \item[a)]

\textit{}

\end{enumerate} \points{r lPointsQ4$TaskA}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[b)]

\textit{}

\end{enumerate} \points{r lPointsQ4$TaskB}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[c)]

\textit{}

\end{enumerate} \points{r lPointsQ4$TaskC}

Solution

\clearpage \pagebreak

Problem 5:

\textit{}

\begin{enumerate} \item[a)]

\textit{}

\end{enumerate} \points{r lPointsQ5$TaskA}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[b)]

\textit{}

\end{enumerate} \points{r lPointsQ5$TaskB}

Solution

\clearpage \pagebreak

\begin{enumerate} \item[c)]

\textit{}

\end{enumerate} \points{r lPointsQ5$TaskC}

Solution



charlotte-ngs/rteachtools documentation built on Sept. 21, 2023, 4:20 p.m.