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

play

Tell swirl to ignore console input for a while.


Description

It is sometimes useful to play around in the R console out of curiosity or to solidify a concept. This command will cause swirl to remain idle, allowing the user to experiment at will, until the command nxt() is entered.

Usage

play()

Examples

## Not run: 

| Create a new variable called `y` that contains the number 8.

> play()

| Entering play mode. Experiment as you please, then type nxt()
| when you ready to resume the lesson.

> 10/14
> [1] 0.7142857
> zz <- 99
> zz
> [1] 99
> nxt()

| Resuming lesson...

## End(Not run)

swirl

Learn R, in R

v2.4.5
MIT + file LICENSE
Authors
Sean Kross [aut, cre], Nick Carchedi [aut], Bill Bauer [aut], Gina Grdina [aut], Filip Schouwenaars [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.