Skip to contents

Takes a questionnaire written in proper QDOC format and generates an object that is ready to be uploaded as a survey. See vignette("qdocs") for a guide to the QDOC format.

Usage

read_qdoc(file = NULL, gdoc = NULL, text = NULL, oauth_token = get_token())

Arguments

file

File for questionnaire written in proper QDOC format.

gdoc

File in Google Drive for Google Doc questionnaire written in proper QDOC format. See drive_download for acceptable formats (e.g. URL, file ID, or dribble object if you're fancy).

text

Character string written in in proper QDOC format.

oauth_token

Your OAuth 2.0 token (only needed if questionnaire references question bank or templates). By default, retrieved from get_token().

Value

Output of class qdoc.

Examples

if (FALSE) { ## not run
data(qdocs)

set_token("XXXXXXX")

read_qdoc(text = qdoc.simple) # simple format
read_qdoc(text = qdoc.adv)    # advanced format
}