util_replace_codes_by_NA: Utility function to replace missing codes by 'NA's

View source: R/util_replace_codes_by_na.R

util_replace_codes_by_NAR Documentation

Utility function to replace missing codes by NAs

Description

Substitute all missing codes in a data.frame by NA.

Usage

util_replace_codes_by_NA(
  study_data,
  meta_data = "item_level",
  split_char = SPLIT_CHAR,
  sm_code = NULL
)

Arguments

study_data

Study data including jump/missing codes as specified in the code conventions

meta_data

Metadata as specified in the code conventions

split_char

Character separating missing codes

sm_code

missing code for NAs, if they have been re-coded by util_combine_missing_lists

Codes are expected to be numeric.

Value

a list with a modified data frame and some counts


dataquieR documentation built on July 26, 2023, 6:10 p.m.