createCourse: This is the main function which creates the final course.

Description Usage Arguments Value

Description

With createCourse one can create a course based on a course list. To see how those lists have to look like see the How to use in the Readme.

NOTE: This function is implemented very inefficient with this helper function 'n()'. But this helps reading the code and even for larger courses the performance is sufficient.

Usage

1
2
3
4
5
6
createCourse(title, course, file.name, subtitles = NA, course.list,
  path = getwd(), render = TRUE, suppress = FALSE, year, month,
  author = NA, course.date = NA, keep.source = FALSE, bibliography,
  reset.exercise = TRUE, yaml.subtitle = NA, open.pdf = TRUE, scope,
  clean.dir = TRUE, template = "preamble.sty",
  custom.pandoc = "custom_pandoc.tex", xelatex = FALSE)

Arguments

title

(character(1))
Title of the course. If this is setted to NA, than the title must be specified via the console.

course

(character(1))
This is the directory name for the course (e. g. basis).

file.name

(character(1))
Name for the Rmd file.

subtitles

character
Subtitle of the chapters. The length have to match the length of the course.list object.

course.list

list
The list object containing the course structure.

path

(character(1))
Path to the r courses repo.

render

(logical(1))
If the created file should be rendered after creation, than set this parameter to TRUE (default).

suppress

(logical(1))
If TRUE than the messages of the rendering will be suppressed.

year

(character(1))
Year of the course (if NA, than the year needs be specified via the console).

month

(character(1))
Month of the course (if NA, than the month needs be specified via the console).

author

(character(1))
Author of the course (if NA, than the author needs be specified via the console).

course.date

(character(1))
When did the course take place (if NA, than the duration needs be specified via the console).

keep.source

(logical(1))
Whether to keep the generated (LaTeX) source files.

bibliography

(character(1))
Specify a .bib object in the data folder.

reset.exercise

(logical(1))
Logical parameter which specifies if the exercise counter should be resetted after every subsection.

yaml.subtitle

(character(1))
Set the subtitle in the yaml header. This will overwrite the subtitle vector of length one which is also used in the yaml header (if it is the only subtitle for just one section).

open.pdf

(logical(1))
If the rendered pdf should be opened after the rendering, than set 'open.pdf = TRUE'. This is only possible if 'render = TRUE'.

scope

(character(1))
Character naming the file in which the scope should be stored. If nothing is given, then no scope is created.

clean.dir

(logical(1))
Logical value indicating if the cache, files, knit-figures, and .tex files should be deleted or not.

template

(character(1))
Which LaTeX template file to use. Defaults to "preamble.sty".

custom.pandoc

(character(1))
Character string indicating if a custom pandoc should be used or not. If no custom pandoc should be used pass custom.pandoc = NULL.

xelatex

(character(1))
Character string indicating if xelatex should be used for rendering instead of pdflatex.

Value

character
A character vector containing the lines of the final Rmd file.


compstat-lmu/rcoursesFunctions documentation built on May 8, 2019, 2:43 p.m.