ConvertFactorsToStringReplaceNAInDf: Change factors to strings in a dataframe and assign NA to...

ConvertFactorsToStringReplaceNAInDfR Documentation

Change factors to strings in a dataframe and assign NA to empty cells

Description

This function takes data fields containing illness codes/time of diagnosis distributed in multiple with each row representing one individual. It processed the data and return in episodes of event for all individuals

Usage

ConvertFactorsToStringReplaceNAInDf(df)

Arguments

df

dataframe containing the fields

Value

a data.table object with all episodes

Examples

ConvertFactorsToStringReplaceNAInDf(data.frame("a" = c(1,2,3),"p" = c("t","b",""),"y" = c(NA,"w","r")))

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