get_lesson: Get a carpentries lesson in XML format

View source: R/get_lesson.R

get_lessonR Documentation

Get a carpentries lesson in XML format

Description

Download and extract a carpentries lesson in XML format. This uses gert::git_clone() to download a carpentries lesson to your computer (defaults to the temporary directory and extracts the lesson in ⁠_episodes/⁠ using tinkr::to_xml()

Usage

get_lesson(lesson = NULL, path = tempdir(), overwrite = FALSE, ...)

Arguments

lesson

a github user/repo pattern to point to the lesson

path

a directory to write the lesson to

overwrite

if the path exists, setting this to TRUE will overwrite the path, otherwise, the contents of the path will be returned if it is a lesson repository.

...

arguments passed on to Episode$new().

Value

a list of xml objects, one element per episode.

Examples


if (interactive()) {
  png <- get_lesson("swcarpentry/python-novice-gapminder")
  str(png, max.level = 1)
}

carpentries/pegboard documentation built on Nov. 13, 2024, 8:53 a.m.