title: R - Saving every dataframe in a list of dataframes
body: <p>I have this list of dataframes:</p>
  
  <pre><code>set.seed(1)
  S1 = data.frame(replicate(2,sample(0:130,30,rep=TRUE)))
  S2 = data.frame(replicate(2,sample(0:130,34,rep=TRUE)))
  S3 = data.frame(replicate(2,sample(0:130,21,rep=TRUE)))
  S4 = data.frame(replicate(2,sample(0:130,26,rep=TRUE)))
  df_list1 = list(S1 = S1, S2 = S2, S3 = S3, S4 = S4)
  
  set.seed(2)
  S1 = data.frame(replicate(2,sample(0:130,30,rep=TRUE)))
  S2 = data.frame(replicate(2,sample(0:130,34,rep=TRUE)))
  S3 = data.frame(replicate(2,sample(0:130,21,rep=TRUE)))
  S4 = data.frame(replicate(2,sample(0:130,26,rep=TRUE)))
  df_list2 = list(S1 = S1, S2 = S2, S3 = S3, S4 = S4)
  
  set.seed(3)
  S1 = data.frame(replicate(2,sample(0:130,30,rep=TRUE)))
  S2 = data.frame(replicate(2,sample(0:130,34,rep=TRUE)))
  S3 = data.frame(replicate(2,sample(0:130,21,rep=TRUE)))
  S4 = data.frame(replicate(2,sample(0:130,26,rep=TRUE)))
  df_list3 = list(S1 = S1, S2 = S2, S3 = S3, S4 = S4)
  
  set.seed(4)
  S1 = data.frame(replicate(2,sample(0:130,30,rep=TRUE)))
  S2 = data.frame(replicate(2,sample(0:130,34,rep=TRUE)))
  S3 = data.frame(replicate(2,sample(0:130,21,rep=TRUE)))
  S4 = data.frame(replicate(2,sample(0:130,26,rep=TRUE)))
  df_list4 = list(S1 = S1, S2 = S2, S3 = S3, S4 = S4)
  
  df_list = list (df_list1, df_list2, df_list3, df_list4)
  names(df_list) = c("AB_df", "BC_df", "DE_df", "FG_df")
  </code></pre>
  
  <p>I want to save every single dataframe in this list (by write.table). I started to make a list of every single df-name:</p>
  
  <pre><code>level1 = paste("df_list", names(df_list), sep = "$")
  samples = names(df_list[[1]])
  df_names = paste(rep(level1, each = length(samples)), samples, sep = "$")
  </code></pre>
  
  <p>My idea is now to loop though this list and save the dataframe with write.table and automatically assign a name.</p>
  
  <p>But my problem is that <code>df_names[i]</code> is a character and I cant use it as a df-path. Any idea?</p>