Description Usage Arguments References Examples
View source: R/parsons_problem.R
This function implements the parsons problem, as exposed by
question_parsons()
. Most users will only use this function inside a
learnr
tutorial, so please see the documentation at question_parsons()
1 2 3 4 5 6 |
initial |
Vector with initial values for problem (to appear in left column). Note: this must be a super-set of all answers. |
text |
Vector of headings for each column. |
header |
Text that appears at the top of the bucket list. (This is
encoded as an HTML |
input_id |
Character vector of |
group_name |
Passed to |
problem_type |
One of |
class |
A css class applied to the rank list. This can be used to define custom styling. |
options |
Options to be supplied to sortable_js object. See sortable_options for more details |
orientation |
Either |
https://js-parsons.github.io/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Example of a shiny app
if (interactive()) {
app <- system.file("shiny-examples/parsons_app.R", package = "parsons")
shiny::runApp(app)
}
## -- example-parsons -----------------------------------------------------
## Parson's problem
parsons_problem(
header = "This is an example of a Parsons problem",
text = c("Drag from here", "Construct your solution here"),
initial = c(
"iris",
"mutate(...)",
"summarize(...)",
"print()"
),
input_id = "input_parsons"
)
parsons_problem(
initial = c(
"iris",
"mutate(...)",
"summarize(...)",
"print()"
),
input_id = "input_parsons"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.