extract_type_orientation: Extract Type and Orientation

View source: R/format_questions.R

extract_type_orientationR Documentation

Extract Type and Orientation

Description

This function takes a string representing a question type and its optional orientation (e.g., "ordering<|>h") and splits it into two separate components: the type and the orientation. If the orientation is not provided, it defaults to "v".

Usage

extract_type_orientation(type)

Arguments

type

A character string indicating the type of a question, which may optionally include an orientation separated by "<|>". For example: "ordering<|>h", "ordering<|>v", or just "ordering".

Value

A list with two elements:

type

The main question type as a character string.

orientation

The orientation of the type as a character string. Defaults to "v".


moodef documentation built on April 12, 2025, 1:42 a.m.