Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unpack_course

Unpack an .swc file into a swirl course


Description

Invisibly returns the path to the unpacked course directory.

Usage

unpack_course(file_path = file.choose(),
  export_path = dirname(file_path))

Arguments

file_path

Optional, full path to the .swc file you wish to unpack. If not specified, you will be prompted to choose a file interactively.

export_path

Optional, full path to the directory where the swirl course should be exported. If not specified, the course will appear in the same directory as the .swc file.

Value

A string, the path to the unpacked course directory, invisibly.

Examples

## Not run: 
# Unpack a course and interactively choose a .swc file
unpack_course()

# Unpack a course where the .swc file is explicitly specified
unpack_course(file.path("~", "Desktop", "R_Programming.swc"))

# Unpack a course and specify where the .swc file is located and where the
# course should be exported.
unpack_course(file.path("~", "Desktop", "R_Programming.swc"),
 file.path("~", "Developer", "swirl"))

## End(Not run)

swirlify

A Toolbox for Writing 'swirl' Courses

v0.5.3
MIT + file LICENSE
Authors
Sean Kross [aut, cre], Nick Carchedi [aut], Chih-Cheng Liang [ctb], Wush Wu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.