How to apply ensemble modelling approach for each group in data set? : Suppose , I have a data set which consists of variables like population age, life expectancy,gender , country, year(monthly data for each year). I would like to predict life expectancy (years) by each country. How can I apply ensemble modelling approach and scale it across all the countries?I am using R

Thanks
