Skip to contents

Each row in the text file 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_csv(qc, file, sep)

# S3 method for question_category
define_questions_from_csv(qc, file, sep = ",")

Arguments

qc

A question_category object.

file

A string, name of a text file.

sep

Column separator character.

Value

A question_category.

Details

For answers where a vector is required, "<|>" is used as a separator of the vector elements.

Examples


file <- system.file("extdata", "questions.csv", package = "moodef")
qc <-
  question_category(category = 'Initial test', adapt_images = TRUE) |>
  define_questions_from_csv(file = file)