Hi everyone,
I have four periods: "1986-01", "1987-01", "1988-01", "1989-01"
I want to make a dataset where each of the following calculations gather in one dataframe:
library("PriceIndices")
tornqvist(df, start="1986-01", end="1986-01", interval = FALSE)
tornqvist(df, start="1986-01", end="1987-01", interval = FALSE)
tornqvist(df, start="1986-01", end="1988-01", interval = FALSE)
tornqvist(df, start="1986-01", end="1989-01", interval = FALSE)
tornqvist(df, start="1987-01", end="1986-01", interval = FALSE)
etc.
Is it possible to do this in a FOR-loop so I can get a more compact code?
Thank you in advance.