Q:

How to add data frames to a list and name them from a user written function

I think I can ask this question without explaining the details of why I am doing it, lets try:
I am writing a function, part of what it does is create a data frame called x. I have a list that I would like to store this data frame in called Subsets. I can get the function to place x within subsets using this code:
Subsets <- append(Subsets, list(x))#adds x to Subsets

This is great, but the purpose of having the list Subsets is to store multiple data frames (i.e., the function will be used for multiple xs, and this data frame for each x will be neatly stored in the list object Subsets). Naturally, I want to name this data frame something unique every time I use it for a different x. The naming convention I want to use can be extracted from information within the data frame x. I want to paste the values in x[1,1] and x[1,6] (which are columns that denote the unique location and id of each x) and use this to name the data frame stored within the list Subsets. 
I can (externally, outside the function) give make a new data frame from x with the name I want using assign(paste0(x[1,1],x[1,6]),x)
but when I try to combine these to make that the name of the data frame within a list, I cant get it to work:
#the word in x[1,1] is NY and the word in x[1,6] is 1 
#so the name of the object within the list is supposed to become NY1
Subsets <- append(Subsets, list(assign(paste0(x[1,1],x[1,6]),x),)

what am I doing wrong?

A:

You need to create a list with an element named according to paste0(x[1,1],x[1,6]).  What assign does is create an object with that name.
This code should do what you want:
newlist <- list(x)
names(newlist) <- paste0(x[1,1],x[1,6])
Subsets <- c(Subsets, newlist)

