text: user7427: I have two lists of dataframes. List x and list my_list. Each having four dataframes and their names are same for the two lists, i.e., bray-curtis, Chao1, FB, and Shannon.
  The dataframes within the two lists have same element names, but they contain different information. This is because list x has been generated after some operations on list my_list.
  Now I want to write a function and run that on list x with `lapply. the command I want to write as a function is
  forest(x$Chao1, slab = paste(my_list$Chao1$StudyID))
  
  Here, the first Chao1 is coming from list x while the second  Chao1 is coming from the list my_list. It works for a single dataframe but I am unable to write the codes with lapply so that it runs across all the dataframes of the lists.
  The desired outputs are four plots from four dataframes of list x.
  Can anyone please help me?
  Update: @gringer's approach works, but it saves all the plots in a single list. When I tried to save the images with following command it just saved the last image:
  tiff(filename = "~/Desktop/image.tiff", width = 30, height = 30, units = "cm", res = 1200)
  
  Is there a way to save all them individually?
  Thanks
  
  user73: Assuming the lists are named, and you want to fetch the element with the same name from each list, I'm guessing something like this would work (or at least get you closer to a solution):
  v <- lapply(names(x), function(var){
     forest(x[[var]], slab=(my_list[[var]])$StudyID)
  })
  
  When creating images that don't have a multi-page format (i.e. anything except PDF), and not changing the image name with each save, you need to add in a format specifier to tell R what to do with new created images. For example, this will add a three digit zero-padded number for each new TIFF image:
  tiff(filename = "~/Desktop/image_%03d.tiff", width = 30, height = 30, units = "cm", res = 1200)
  
  
original_text: 7427: <p>I have two lists of dataframes. List <code>x</code> and list <code>my_list</code>. Each having four dataframes and their names are same for the two lists, i.e., <code>bray-curtis, Chao1, FB</code>, and <code>Shannon</code>.</p>
  <p>The dataframes within the two lists have same element names, but they contain different information. This is because list <code>x</code> has been generated after some operations on list <code>my_list</code>.</p>
  <p>Now I want to write a function and run that on list <code>x</code> with `lapply. the command I want to write as a function is</p>
  <pre><code>forest(x<span class="math-container">$Chao1, slab = paste(my_list$</span>Chao1$StudyID))
  </code></pre>
  <p>Here, the first <code>Chao1</code> is coming from list <code>x</code> while the second  <code>Chao1</code> is coming from the list <code>my_list</code>. It works for a single dataframe but I am unable to write the codes with <code>lapply</code> so that it runs across all the dataframes of the lists.</p>
  <p>The desired outputs are four plots from four dataframes of list <code>x</code>.
  Can anyone please help me?</p>
  <p>Update: @gringer's approach works, but it saves all the plots in a single list. When I tried to save the images with following command it just saved the last image:</p>
  <pre><code>tiff(filename = &quot;~/Desktop/image.tiff&quot;, width = 30, height = 30, units = &quot;cm&quot;, res = 1200)
  </code></pre>
  <p>Is there a way to save all them individually?</p>
  <p>Thanks</p>
   73: <p>Assuming the lists are named, and you want to fetch the element with the same name from each list, I'm guessing something like this would work (or at least get you closer to a solution):</p>
  <pre><code>v &lt;- lapply(names(x), function(var){
     forest(x[[var]], slab=(my_list[[var]])$StudyID)
  })
  </code></pre>
  <p>When creating images that don't have a multi-page format (i.e. anything except PDF), and not changing the image name with each save, you need to add in a format specifier to tell R what to do with new created images. For example, this will add a three digit zero-padded number for each new TIFF image:</p>
  <pre><code>tiff(filename = &quot;~/Desktop/image_%03d.tiff&quot;, width = 30, height = 30, units = &quot;cm&quot;, res = 1200)
  </code></pre>
  