So currently i\'m stuck in a problem around FOR and IF function.
I have a full working code like this:
#my data input demand.variation=c(1,4,20,23,37)