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

See Also

Other missing_functions: util_all_intro_vars_for_rv(), util_count_expected_observations(), util_filter_missing_list_table_for_rv(), util_get_code_list(), util_is_na_0_empty_or_false(), util_observation_expected(), util_remove_empty_rows()


dataquieR documentation built on May 29, 2024, 7:18 a.m.