I have a list with multiple groupings of variables created by aggregate()
from the package hts
. I want to map a specific forecasting function depending on the name of the group.
Example of names:
G3/GRSA_
G3/COAR_
G4/COAR_RURA_
...
Basically I want something like
map(list, contains*("COAR"), forecast)
to forecast both G3/COAR_
and G4/COAR_RURA_