Join to variables to create a new one, that contains the mean of the numbers in the old variable

Hi @ruthos96 and welcome to the RStudio Community :partying_face: :partying_face: :partying_face: :partying_face:

It would help if you could provide actual data that we could use to provide you with help. You may want to take a look at this great article about how to make a "reproducible example".