I have example data as follows:
listoflists=
list(
list(a = c(1,'a',3,4) , b = c(5,'b',6,7) ),
list(a = c(1,'a',2,6) , b = c(5,'b',0,8) ),
list(d = c(1,'a',2,6) , b = c(5,'b',0,8) ),
list(d = c(1,'a',2,3) , b = c(5,'b',0,8) , a = c(5,'b',0,8)),
list(d = c(1,'a',1,1))
)
I would like rename the names (such as a and b), (only) if they have already been used. For example by adding a number at the end.
I am having some trouble thinking of the right way to approach this..
Any suggestions?
