Having a basic issue using merge function
问题 I'm having a problem with merge() I have two data frames, one that I imported from SPSS (ssfia) and one that I created on my own. The latter contains a variable indexing the degree of overlap between two variables in the former. match<-ifelse(ssfia$Func_Source==ssfia$Symptom_Source,1,0) I want to merge this new "match" variable by "ID" the SPSS dataset (ssfia), so I made a data frame with ID and my new Match variable. matchf<-data.frame(match,ssfia$ID) Now I try to merge them... merge(ssfia