Update_Question_Properties: Batch update question properties

Update_Question_PropertiesR Documentation

Batch update question properties

Description

This allows you to change the question properties of as many questions as you like.

Usage

Update_Question_Properties(Question_Update_Table)

Arguments

Question_Update_Table

This is a data.table that has the following columns:

  • qid: the qid of the question you would like to update <this column is mandatory!>

  • new_relevance: <optional> the relevance equation you want to update- simply a string with a relevance equation

  • new_title: <optional> this is what you might think of as the "question code"- it isn't visible to the participant and serves as the questions variable name in the export file

  • new_question: <optional> the question text. This can also be html/css/javascript

  • new_help: <optional> The help text for the question

  • new_preg: <optional> I'm not even sure what this does. But, it is available for change.

  • new_other: <optional> I'm not even sure what this does. But, it is available for change.

  • new_mandatory: <optional> Here you can decide if the question is mandatory.

  • new_question_order: <optional> Here you can set the question order.

  • new_scale_id: <optional> I'm not even sure what this does. But, it is available for change.

  • new_same_default: <optional> I'm not even sure what this does. But, it is available for change.

  • new_modulename: <optional> I'm not even sure what this does. But, it is available for change.

  • language: <optional> this is when you are changing different language versions of the question in a multilingual survey. If you do not add this column or leave it blank, the updates will default to only the base language of the survey. Please only one language per row. If you have 3 languages in your survey and you want to update all of them, you need a row for each language that sets, for example, the new_question or new_help. Multilingual surveys are tricky in that not all options will be available for all languages. Or, seen from another perspective, they need to be the same across all languages.

Examples

## Not run: 
Update_Question_Properties(data.table(qid = 123455, new_relevance = 1))

## End(Not run)


bpresentati/surveyR documentation built on March 19, 2022, 3:40 a.m.