create_lesson: Create a carpentries lesson

Description Usage Arguments Value Examples

View source: R/create_lesson.R

Description

This will create a boilerplate directory structure for a Carpentries lesson and initialize a git repository.

Usage

1
2
3
4
5
6
create_lesson(
  path,
  name = fs::path_file(path),
  rstudio = rstudioapi::isAvailable(),
  open = rlang::is_interactive()
)

Arguments

path

the path to the new lesson folder

name

the name of the lesson. If not provided, the folder name will be used.

rstudio

create an RStudio project (defaults to if RStudio exits)

open

if interactive, the lesson will open in a new editor window.

Value

the path to the new lesson

Examples

1
2
3
4
tmp <- tempfile()
on.exit(unlink(tmp))
lsn <- create_lesson(tmp, name = "This Lesson", open = FALSE)
lsn

zkamvar/sandpaper documentation built on Nov. 25, 2021, 1:16 p.m.