I have two variables, varL and varR, which have the information that they are L and R respectively. Depending on wether a third object has as imput 'L' or 'R', I would like to reference varL or varR respectively. Is there any way to do this?
Specifically, varL and varR are arrays. If the third object has as imput 'L', I would like to have access to varL[i] for some i, and the same goes for 'R'. I know this is not even remotely correct, but I was looking for something like
(var +'L')[i] or something