bucket_problem: Create a bucket problem (experimental).

Description Usage Arguments

View source: R/bucket_problem.R

Description

This function implements the bucket problem, as exposed by question_bucket(). Most users will only use this function inside a learnr tutorial, so please see the documentation at question_bucket()

Usage

1
2
3
4
5
bucket_problem(initial, text = c("Drag from here",
  "Construct your solution here"), header = NULL, input_id, group_name,
  class = "default-sortable default-bucket",
  options = sortable_options(), orientation = c("horizontal",
  "vertical"))

Arguments

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 <p> tag, so not strictly speaking a header.)

input_id

Character vector of input_id to pass (individually) to rank_list().

group_name

Passed to SortableJS as the group name. Also the input value set in Shiny. (input[[group_name]])

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 horizontal or vertical, and specifies the layout of the components on the page.


rstudio/parsons documentation built on Nov. 5, 2019, 4:17 a.m.