unpack_course: Unpack an '.swc' file into a swirl course

Description Usage Arguments Value Examples

Description

Invisibly returns the path to the unpacked course directory.

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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 documentation built on May 28, 2019, 9:02 a.m.