Merge spatial data and dataframe in R

merge just like two dataframes with merge command

worldCountries <- merge(worldCountries, countryData, by.x = "id-number", by.y = "countryID")