parseIncludeExcludeCol: Helper function to parse the trait dependencies

parseIncludeExcludeColR Documentation

Helper function to parse the trait dependencies

Description

Each composite trait with dependencies considered a tree as chain of dependency is possible. To parse and retrieve all codes needed, this function first searches for a leaf nodes and then add all codes of nodes along the way until root is reached; this operation is done recursively until all dependent codes are filled into the df

Usage

parseIncludeExcludeCol(df, InExCol, concat_to_df = FALSE, VctAllColumns)

Arguments

df

definition table as dataframe

InExCol

name of dependency column that needs lookup

concat_to_df

option to update the input df otherwise store the codes in a new df,default: TRUE

VctAllColumns

names of columns in which codes should be updated

Value

the original dataframe or a new dataframe with codes


niekverw/ukbpheno documentation built on Oct. 30, 2023, 9:17 p.m.