GLAD_clean: Cleans Questionnaires

Description Usage Arguments Details

Description

Cleans all questionnaires or one specified questionnaire in 'dat_list' and creates exports.

Usage

1
2
3
4
5
6
7
8
GLAD_clean(
  questionnaire,
  dat_list,
  path,
  limits = TRUE,
  rename = TRUE,
  format = "feather"
)

Arguments

questionnaire

A character string indicating what questionnaire to clean by its acronym. The questionnaire data must be in 'dat_list'.If it's "All", all questionnaires in 'dat_list' are cleaned.

dat_list

A named list of dataframes produced by 'GLAD_read'.

limits

A logical indicating whether limits (min and max) are to be applied

rename

A logical. TRUE if the variables are to be renamed to 'Easy.name'.

format

A character string. It should be one of c("feather", "rds", "sav", "dta", "sas")

Details

The cleaning process removes Qualtrics derived variables, removes participants with duplicated IDs or without gender information, recodes ‘Categorical' and 'Binary' variables to class ’lfactor' from the 'lfactor' package with labels attached and create numeric copies, applies limits to 'Numeric/Continuous' variables and creates four version of export files: RDS and CSV files with 'New.variable' names, and RDS and CSV files with 'Easy.name' names.


lyh970817/gladfunctions documentation built on Sept. 19, 2021, 2:01 p.m.