Learn R Programming

swirlify (version 0.5.3)

wq_figure: Template for figure questions

Description

Template for figure questions

Usage

wq_figure(output = "explain the figure here", figure = "sourcefile.R",
  figure_type = "new")

Arguments

output

Text that is displayed to the user.

figure

An R script that produces a figure that is displayed in the R plotting window.

figure_type

Either "new" or "add". "new" indicates that a new plot should be displayed, while "add" indicates that features are being added to a plot that is already displayed.

Examples

Run this code
# NOT RUN {
# While writing a new lesson by hand just use:
wq_figure()

# If converting from another format to a swirl course you may want to sue the
# API:
wq_figure("Here we can see the curve of the normal distribution.",
 "normalplot.R", "new")
# }

Run the code above in your browser using DataLab