I want to make the equivalent of a python dict in R. Basically, in python I have:
visited = {}
if atom_count not in visited:
Do stuff
visited[atom_count] =
I believe that the use of a hash table (creating a new environment) may be the solution to your problem. I'd type out how to do this but I just did so yesterday day at talkstats.com.
If your dictionary is large and only two columns then this may be the way to go. Here's the link to the talkstats thread with sample R code:
HASH TABLE LINK