I tried finding a way to handle NA data but unable to do so, Please assist me on this.
I have below data,
R1 <- c("15515","5156","65656","1566", "2857","8888","65656","1566","65651")
R2 <- c("515","5156.11-","415-","1455-","886","888","777","666","4457")
RC1 <- c("AW","FG","ZA","ZI","","CW","","","")
RC2 <- c("SSSBB","","","ZXXQA","","CQAER","","KKHDY","TTQWW")
RC3 <- c("KKAJDJHW","XVVJAKWA","","","","CDDGAJJA","GGGAJTTD","","BBNMNJJI")
df <- data.frame(R1,R2,RC1,RC2,RC3)
I am using below code to tackle NA among only RC1,RC2 & RC3
df_1$RCC <- with(df_1, coalesce(df_1$RC3,df_1$RC2,df_1$RC1))
df_1
I am unable to fetch data from RC1 & RC2. Need your Kind assistance.