parse_NA_values: Parse missing value information from var_info

Description Usage Arguments Value Examples

View source: R/data_io.R

Description

The input is the Missing_Values column in var_info, which must have a length equal to the number of columns in the data file. This function is for use in [load_cp_data] to ensure only values expected for each trait are available.

Usage

1
parse_NA_values(missing_values)

Arguments

missing_values

A string containing values that should be recoded as NA separated by a comma

Value

A vector with the values that represent NA

Examples

1
2
3
# Call parse_NA_values to return a vector of individual proxies for NA
na_values <- parse_NA_values("-1,99,NA")
print(na_values)

MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.