Learn R Programming

opentriviadb (version 1.0.0)

get_questions: get_questions

Description

Document

Usage

get_questions(
  number = 10,
  category,
  difficulty = c("any", "easy", "medium", "hard"),
  type = c("any", "multiple", "boolean")
)

Arguments

number

Number of questions to return. Max of 50.

category

Category of questions. Leave blank for random categories.

difficulty

Difficulty of questions.

type

Multiple choice or true/false questions.

Value

Dataframe of questions and answers

Examples

Run this code
# NOT RUN {
library(opentriviadb)
dat <- get_questions(2, "General Knowledge", "medium", "boolean")
# }

Run the code above in your browser using DataLab