How to merge 3 dataframes by id in R



I have 3 dataframes(contacts, bookings,tickets). <- merge(contacts, bookings,tickets, by=c(“contact_id”, “booking_id”,“ticket_id”))

While merging data frame ,getting below error message.

Error in, x) :
‘by’ must specify one or more columns as numbers, names or logical


total_data <- merge(contacts, bookings, by=“contact_id”,all=TRUE)
new_data <- merge(total_data, tickets, by=“contact_id”,all=TRUE)

It is working fine.