I want to merge two dataframes in R studio but only by matching values. The 1st df have 1848 observations, while the other one have 1912 observations. See attatched file for the dataframes. The problem is that when I run my code:
mergetotal <- merge(mhdds55unik1, mhdds55unik3, by=c("hhid","Fødevare"), all=FALSE)
...it gives me 1912 observations, while I only want the 1848 observations.
Rkoder.pdf (165.7 KB)
What am i doing wrong?