title: Tidyverse and R: how to count rows in a tibble of a nested dataframe
body: <p>So, I've checked multiple posts and haven't found anything.  According to <a href="https://stackoverflow.com/questions/47479283/r-how-to-access-a-tibble-in-a-tibble">this</a>, my code should work, but it isn't.</p>
  
  <p>Objective:  I want to essentially print out the number of subjects--which in this case is also the number of rows in this tibble.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code> data&lt;-read.csv("advanced_r_programming/data/MIE.csv")
  
  make_LD&lt;-function(x){
    LongitudinalData&lt;-x%&gt;%
      group_by(id)%&gt;%
      nest()
    structure(list(LongitudinalData), class = "LongitudinalData")
  }
  
  print.LongitudinalData&lt;-function(x){
    paste("Longitudinal dataset with", x[["id"]], "subjects")
  
  }
  
  x&lt;-make_LD(data)
  
  print(x)
  </code></pre>
  
  <p><strong>Here's the head of the dataset I'm working on:</strong></p>
  
  <pre><code>&gt; head(x)
  [[1]]
  # A tibble: 10 x 2
        id                  data
     &lt;int&gt;                &lt;list&gt;
   1    14 &lt;tibble [11,945 x 4]&gt;
   2    20 &lt;tibble [11,497 x 4]&gt;
   3    41 &lt;tibble [11,636 x 4]&gt;
   4    44 &lt;tibble [13,104 x 4]&gt;
   5    46 &lt;tibble [13,812 x 4]&gt;
   6    54 &lt;tibble [10,944 x 4]&gt;
   7    64 &lt;tibble [11,367 x 4]&gt;
   8    74 &lt;tibble [11,517 x 4]&gt;
   9   104 &lt;tibble [11,232 x 4]&gt;
  10   106 &lt;tibble [13,823 x 4]&gt;
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>[1] "Longitudinal dataset with  subjects"
  </code></pre>
  
  <p>I've tried every possible combination from the aforementioned stackoverflow post and none seem to work.  </p>