## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(ThinkingGrid)

## ----load_setup_file----------------------------------------------------------
setup_file <- system.file("extdata", "sample_setup_file.csv", package = "ThinkingGrid")
setup_data <- read.csv(setup_file)

knitr::kable(setup_data, caption = "Sample Setup File")

## ----generate_survey, eval=FALSE----------------------------------------------
# generate_survey(
#   survey_setup_file = setup_file, # path to the setup file
#   output_file_name = "my_thinking_grid_survey", # custom name for the output file
#   question_text = TRUE # whether to include question text in the survey
# )

## ----read_survey_data, eval = identical(Sys.getenv("NOT_CRAN"), "true")-------
# # Path to the downloaded Qualtrics survey data CSV file
# qualtrics_data_file <- system.file("extdata", "sample_qualtrics_output.csv", package = "ThinkingGrid")
# 
# survey_data <- read_qualtrics_data(
#   data_file = qualtrics_data_file, # path to the Qualtrics data file
#   setup_file = setup_file # path to the setup file
# )

## ----display_survey_data, eval = identical(Sys.getenv("NOT_CRAN"), "true")----
# knitr::kable(survey_data, caption = "Survey Data Read from Qualtrics")

