get_detailed_type_names: Get Detailed Type Names

View source: R/format_questions_extended.R

get_detailed_type_namesR Documentation

Get Detailed Type Names

Description

Determines the type column of a data frame based on specific conditions and the content of other columns in the data frame.

Usage

get_detailed_type_names(df)

Arguments

df

A data frame containing at least the following columns:

  • type: A character column representing the type of each question.

  • answer: A character column containing answers for each question.

  • Additional columns with a prefix "a_" representing associated answer fields.

Details

It checks if some value in the type column are within the allowed set (⁠'', 'h', 'v', 'x'⁠) and updates each row based on the associated answers and other fields.

Value

A character vector containing the updated type values.


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