getStructure: Get the structure of all existing chapters

Description Usage Arguments Value

Description

The function getStructure reads in the structure of all existing Rmd chapters/exercises in the chapters or exercises directory. This file is also needed in the setup.Rmd file. In the most cases this function is used to get the specific directory a file lies in. Therefore the chapter names have to be unique!

The generation of the structure is done automatically. This is very handy if someone copies Rmd files from one chapter or course to another.

The files column in the resulting data.table is also the name one can use to create a course list and create a course Rmd file with createCourse.

Usage

1
getStructure(type = "chapters", path = getwd())

Arguments

type

(character(1))
The first subdirectory of the files. Have to be chapters or exercises.

path

(character(1))
The working directory of the rcourses repo. Please notice, that every path containing /rcourses will work.

Value

data.table::data.table
getStructure returns a data.table with all the existing chapter or exercise files. The data table contains the following variables: - course: Course which contains the file - chapters: Chapter which contains the file - files: Name of the files


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