convert_zofar_export_to_handcrafted_questionnaire: Convert Zofar Export to Handcrafted Questionnaire Format

View source: R/convert_zofar_export_to_handcrafted_questionnaire.R

convert_zofar_export_to_handcrafted_questionnaireR Documentation

Convert Zofar Export to Handcrafted Questionnaire Format

Description

This script takes the export of zofar and converts it into a format which can be manually edited. The zofar export must have the following structure:

|--ins1 (must have the pattern "ins{number}")
  |--5.json
  |--images
     |--5
        |--5_1.png
        |--5_1.json
        |--5_2.png
        |--5_2.json
        |--5_3.png
        |--5_3.json

The output directory will be created or overwritten.

Usage

convert_zofar_export_to_handcrafted_questionnaire(
  input_directory,
  output_directory = file.path(".", "handcrafted", "pages")
)

Arguments

input_directory

Input path, e.g. "./pages/ins1", must contain "ins{number}"

output_directory

Output directory, e.g. "./handcrafted/pages", will be created if it does not exist or will be overwritten otherwise

Examples

## Not run: 
# All examples do exactly the same. They convert everything under "./ins1"
# into the handcrafted format and write the output in "./handcrafted/pages".
convert_zofar_export_to_handcrafted_questionnaire(input_directory = "./ins1")
convert_zofar_export_to_handcrafted_questionnaire(input_directory = "./ins1", output_directory = "./handcrafted/pages")

## End(Not run)

dzhw/questionMetadataPreparation documentation built on April 12, 2025, 11:44 a.m.