title: How to modify certain values in a list that is inside a list (in R)
body: <p>I have a list that consists of several lists that have certain structure: character, numeric sequence, and character:</p>
  
  <pre><code>myList &lt;- list(list("name1", c(2000,2001,2002), "suffix1"),
                 list("name2", c(2000,2001,2002), "suffix2"),
                 list("name3", c(2000,2001,2002), "suffix3")
                 )
  </code></pre>
  
  <p>I want to modify the list so that the sequence is limited to certain maximum value, say 2001, in some of the lower nest lists, say the first two:</p>
  
  <pre><code>myListModified &lt;- list(list("name1", c(2000,2001), "suffix1"),
                         list("name2", c(2000,2001), "suffix2"),
                         list("name3", c(2000,2001,2002), "suffix3")
                         )
  </code></pre>
  
  <p>I've tried a few ways to subset first the upper nest list and then the elements in lower nest lists but that's not as straightforward as I thought. Perhaps there's some completely different way to tackle this?</p>