I am hoping to combine two data frames,db1 and db2 which have 2 columns, One is the name of a variable called Phenotype (character) and one is the frequency. I want to combine both the dataframes in such a way that if the same phenotype exists in the other dataframe, the rows merge and the frequency increases rather than it adding stacking the dataframes one over another. I don't know how to do this on R, sp please can somebody help
db1 <- data.frame("Phenotype" = c("Intellectul Disability", "Cystic Kidney Disease", "Epilepsy", "Cardiac Disorder"), "Freq" = c(10,2,3,4))
db2 <- data.frame("Phenotype" = c("Kabuki Syndrome", "Cystic Kidney Disease", "Intellectul Disability", "Epilepsy"), "Freq" = c(13,1,0,2))
bd3 <- rbind(db1,db2)# this is what I get
bdc <- data.frame("Phenotype" = c("Intellectul Disability", "Cystic Kidney Disease", "Epilepsy", "Cardiac Disorder","Kabuki Syndrome"), "Freq" = c(10,3,5,4,13)) # this is what I am hoping to get
Thank you