Thx, it was very helpfull. It took me a litlle time to implement in my case.
1 i had to rename a columnname (Countries and territories). this gave an error cause of the "and"
so my final code is now:
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(tibble))
finalmatrix <- workingset
rownames_to_column(finalmatrix,var = "key") -> finalmatrix1
rownames_to_column(cont_country,var = "key") -> continents
finalmatrix1 %>% select(key,dateRep,cases,deaths,countryfull,geoId) -> finalmatrix1
continents %>% select(key,GeoId,continent) -> contcountry
inner_join(finalmatrix1,contcountry,by="key") -> finalend
thx for the tip of reprex, is also very helpfull
Kind regards and merry Eastern,
Rob