swirl: An interactive learning environment for R and statistics.

Description Usage Arguments Details Examples

View source: R/swirl.R

Description

This function presents a choice of course lessons and interactively tutors a user through them. A user may be asked to watch a video, to answer a multiple-choice or fill-in-the-blanks question, or to enter a command in the R console precisely as if he or she were using R in practice. Emphasis is on the last, interacting with the R console. User responses are tested for correctness and hints are given if appropriate. Progress is automatically saved so that a user may quit at any time and later resume without losing work.

Usage

1
swirl(resume.class = "default", ...)

Arguments

resume.class

for development only; please accept the default.

...

arguments for special purposes only, such as lesson testing

Details

There are several ways to exit swirl: by typing bye() while in the R console, by hitting the Esc key while not in the R console, or by entering 0 from the swirl course menu. swirl will print a goodbye message whenever it exits.

While swirl is in operation, it may be controlled by entering special commands in the R console. One of the special commands is bye() as discussed above. Others are play(), nxt(), skip(), and info(). The parentheses are important.

Sometimes a user will want to play around in the R console without interference or commentary from swirl. This can be accomplished by using the special command play(). swirl will remain in operation, silently, until the special command nxt() is entered.

The special command skip() can be used to skip a question if necessary. swirl will enter the correct answer and notify the user of the names of any new variables which it may have created in doing so. These may be needed for subsequent questions.

Finally, info() may be used to display a list of the special commands themselves with brief explanations of what they do.

Examples

1
2
3
4
5
## Not run: 

swirl()

## End(Not run)

swirl documentation built on Jan. 16, 2020, 5:03 p.m.