nonf[is.na(share)&technology=="Liquids"&type%in%c("middle","advanced"),share:=0]## Liquids don't have differentiation before 2020: a 0 has to be applied to "middle" and "advanced" technologies
nonf[is.na(share),share:=1]## all technologies but Liquids don't have the differentiation; a 1 is applied
capc[is.na(share)&technology=="Liquids"&type%in%c("middle","advanced"),share:=0]## Liquids don't have differentiation before 2020: a 0 has to be applied to "middle" and "advanced" technologies
capc[is.na(share),share:=1]## all technologies but Liquids don't have the differentiation; a 1 is applied