Hi all,
I am new to R and I am trying to put my financial model from excel to R (sounds weird but I actually got some progress. The question is - the structure of my model is like that:
Account_1 (i.e. Revenue)
2020 2021 2022 2023 ...
obj_1 ... ...
obj_2
obj_3
... ... ...
Account_2 (i.e. Prices)
2020 2021 2022 2023 ...
obj_1 ... ...
obj_2
obj_3
... ... ...
Account_3 (i.e. Volumes)
2020 2021 2022 2023 ...
obj_1 ... ...
obj_2
obj_3
... ... ...
Obviously, Revenue = Prices * Volumes. If there was only one object, then I would turn them into named vectors and do pretty simple vector arithmetics. I could also mutate them into one dataframe with Years as an index.
But with multiple objects, I don't know how to deal with such 2-dimensional array. The goal is to simplify overall arithmetics as possible, but also to mutate these 2-dimensional different accounts in some sort of df.
I need also to be able to refer (+filter, +subset) to either object or year of such array.
What data structure would you suggest me to use? Matrix or lists or what?
Thank you,