I'm trying to merge between two data frames in r. The first data frame contains internal ID and relevant data. The second dataframe contains internal ID, external ID and some irrelevant columns. I want to add the external ID to the first/main data frame and r is giving me the following error:
Error in fix.by(by.y, y) : 'by' must specify a uniquely valid column
the command I use is
Decisions=merge(Decisions,Companies[,c("mispar_rasham")],
by.x = "mispar_chevra" , by.y ="mispar.chevra", all.x = TRUE)
I tried to use the same command before with other secondary data frame and it worked well.
I read about the command and I made sure both columns are defined the same (as.numeric) and both tables are defined as data frames.
I also tried all the answers I found in google for this problem. I'm kind of new with programming I guess I'm missing something basic.