This function visualizes the skip logic of a questionnaire based on the skip logic rules defined in a JSON file. It creates a directed graph showing the flow of questions and their skip patterns.

visualize_quex(path = NULL, file = NULL, responses = TRUE, analysis = NULL)

Arguments

path

A character string specifying the path to the JSON file containing skip logic rules. Default is NULL.

file

A character string specifying the file name to save the graph visualization (.pdf, .svg, .png). Default is NULL.

responses

A logical to determine if responses should be added to the graph visualization. Default is TRUE.

analysis

A dataframe object containing the analytic dataframe to use for generating the responses. This should be the dataframe after recoding takes place using recode_var(). Default is NULL.

Value

A graph object visualizing the skip logic of the questionnaire.

Examples

if (FALSE) { # \dontrun{
# Example usage:
visualize_quex(path = "path/to/your/skiplogic.json", file = "skip_logic_graph.png")
} # }