-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from carpentries/add-lesson-object-vignette
Add lesson object vignette
- Loading branch information
Showing
19 changed files
with
799 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
#' An example lesson fragment | ||
#' Example Lesson Fragments | ||
#' | ||
#' This example was taken from the python novice gapminder lesson | ||
#' @param name the name of the lesson fragment | ||
#' Partial lessons mainly used for testing and demonstration purposes | ||
#' | ||
#' @return a path to a lesson fragment that contains one `_episodes` directory | ||
#' with three files: "10-lunch.md", "14-looping-data-sets.md", and | ||
#' "17-scope.md" | ||
#' @note | ||
#' The lesson-fragment example was taken from the python novice gapminder | ||
#' lesson | ||
#' | ||
#' @param name the name of the lesson fragment. Can be one of: | ||
#' - lesson-fragment | ||
#' - rmd-lesson | ||
#' - sandpaper-fragment | ||
#' - sandpaper-fragment with child | ||
#' | ||
#' @return a path to a lesson fragment whose contents are: | ||
#' - `lesson-fragment` contains one `_episodes` directory with three files: | ||
#' "10-lunch.md", "14-looping-data-sets.md", and "17-scope.md" | ||
#' - `rmd-fragment` contains one episode under `_episodes_rmd` called | ||
#' `01-test.Rmd`. | ||
#' - `sandpaper-fragment` contains a trimmed-down Workbench lesson that | ||
#' has its R Markdown content pre-built | ||
#' - `sandpaper-fragment-with-child` contains much of the same content as | ||
#' `sandpaper-fragment`, but the `episodes/index.Rmd` file references child | ||
#' documents. | ||
#' @export | ||
#' @examples | ||
#' | ||
#' lesson_fragment() | ||
#' lesson_fragment("rmd-lesson") | ||
#' lesson_fragment("sandpaper-fragment") | ||
#' lesson_fragment("sandpaper-fragment-with-child") | ||
lesson_fragment <- function(name = "lesson-fragment") { | ||
system.file(name, package = "pegboard") | ||
allowed <- c("lesson-fragment", "rmd-lesson", | ||
"sandpaper-fragment", "sandpaper-fragment-with-child") | ||
name <- match.arg(name, allowed) | ||
return(system.file(name, package = "pegboard")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.