Define questions from a data frame
Source:R/define_questions_from.R
define_questions_from_data_frame.Rd
Each row in the text data frame is interpreted as a question. We only have to define the columns that we are going to use, the rest of the columns are taken by default.
Usage
define_questions_from_data_frame(qc, df)
# S3 method for question_category
define_questions_from_data_frame(qc, df)
Details
For answers where a vector is required, "<|>" is used as a separator of the vector elements.
See also
Other question definition:
define_question()
,
define_questions_from_csv()
,
define_questions_from_excel()
,
generate_xml()
,
generate_xml_file()
,
question_category()
Examples
file <- system.file("extdata", "questions.csv", package = "moodef")
df <- read_question_csv(file = file)
qc <-
question_category(category = 'Initial test', adapt_images = TRUE) |>
define_questions_from_data_frame(df)