I have a datable such as this one :
library(tidyverse)
library(lubridate)
library(data.table)
DT <- data.table(
"Date"=rep(seq(ymd('2000-01-01'),ymd('2020-12-01'), by = '1 month'),3),
"Country"=rep(c("France","Germany","Italy"),each=21*12),
"Population"=rep(seq(from=10000,to=(10000+21*12-1)),3))
(Yes I was not really inspired to simulate the population).
Now I want to have a new variable, for instance population2 but scaled back to value = 100 for early 2000, and specific to each country (even though they are the same here).
So that each value would have the Population2:=100*Population/Population{for the given country, at date=2000-01-01}