Sunday, July 3, 2016

R add emails to participants for NSF project report

Note: One mismatch occurred due to French and English inputs. Manually corrected this entry. 
library(xlsx)
list.files()
tb = read.xlsx("Actual Participants_v1.xlsx", 1)
tb$LAST.NAME = toupper(tb$LAST.NAME)
fulltb = read.xlsx("eventbrite_registration.xlsx", 2)  
fulltb$Last.Name = toupper(fulltb$Last.Name)
tb$email = fulltb$Email[match( tb$LAST.NAME, fulltb$Last.Name) ]
write.xlsx(tb, "qbio_participants_v2.xlsx")


No comments:

Post a Comment