The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merge IR and KR (Merge IR and KR data file in R)
Merge IR and KR [message #26076] Sat, 04 February 2023 09:25 Go to previous message
Kazi_Salahin is currently offline  Kazi_Salahin
Messages: 9
Registered: February 2023
Member
Dear Concern
Please help me to merge the IR and KR data files of Bangladesh (BDHS-2017-2018) in R. Is it okay if I use the following R command? Please tell me.

############################################################ #######################
#Merge the two dataset

KR$match<-paste(KR$V001, KR$v002)
KR$match<-as.numeric(KR$match)

IR$match<-paste(IR$v001, IR$v002, IR$v003)
IR$match<-as.numeric(IR$match)

KRdata<-merge(KR, IR, by = "match", all = TRUE)
############################################################ #######################

Thank you
 
Read Message
Read Message
Read Message
Previous Topic: Merging 2018 Zambia HR to IR
Next Topic: Merging different rounds
Goto Forum:
  


Current Time: Tue Nov 26 12:15:00 Coordinated Universal Time 2024