A set of tools for writing and sharing interactive courses to be used with swirl.
library(devtools)install_github("swirldev/swirlify", ref = "dev")
We highly recommend using RStudio for authoring swirl content.
library(swirlify)# Create a new lesson and a new coursenew_lesson("My Lesson", "My Course")# Add content to the lesson in a text editor# When you are finished writing your lesson, add it to the course manifestadd_to_manifest()# Convret your course into a `.swc` file so you can share it easily.pack_course()
For extensive documentation on swirlify and tips for writing swirl courses see the swirlify website.
swirl courses have the following structrue:
lesson.yamlfile containing lesson content.
lesson.yamlfile in each lesson directory. Students are prompted with questions in sequential order.
If you have any questions about using swirlify don't hesitate to reach out to us: [email protected]
Fixed issue where Ace editor was not working on Windows.
testit() will be removed in swirlify 0.6.
demo_lesson() which replaces
google_form_decode() to help course authors evaluate their students'
progress in a swirl couse.
swirlify() which starts a Shiny app for authoring swirl lessons.
testit(), although it will be changed back before
swirlify 0.5. This was done because of compatibility issues with swirl.
lp() for quickly finding the file path to the current lesson.yaml.
test_course() now check for proper lesson formatting.
Added tests for packing and unpacking a lesson.
add_license() for easy course licensing.
Removed shiny authoring tool. Development of this tool will continue as a separate project.
unpack_course() to help with sharing courses in
.swc file format.
Changed the API for all of the question writing functions which now start
with the prefix
wq_. This is meant to be used with tab-completion to make
writing lessons easier.
author_lesson(), which is the old R Markdown approach. We me eventually introduce a more efficient R Markdown style that is neatly integrated with the current YAML approach.
new_lesson() with notice to user.
Normalize file paths using
normalizePath() in case user specifies a relative path to a lesson, then changes their working directory.
Allow user to specify path to YAML lesson as an argument to
Add check to
testit() to make sure that the lesson being tested is listed in the course
MANIFEST, if one exists in the course directory.
Add commented out
AUTO_DETECT_NEWVAR <- FALSE to customTests.R template created by
new_yaml(). Setting this variable equal to
FALSE can prevent double evaluation of printing and plotting commands.
hlp() output to include
swirl2html()to convert swirl lessons formatted in YAML to R markdown (Rmd) and html files. The output is a stylized webpage that acts as a standalone tutorial based on the original swirl lesson.
hlp()gives a list of related functions. We plan to integrate this new approach more closely with existing swirlify functions, but it functions well as is.