title: Remove empty lists from a tibble in R
body: <p>I am trying to remove any list from my tibble that has &quot;&lt;chr [0]&gt;&quot;</p>
  <pre class="lang-r prettyprint-override"><code>library(tidyverse)
  
  df &lt;- tibble(x = 1:3, y = list(as.character()), 
               z=list(as.character(&quot;ATC&quot;),as.character(&quot;TAC&quot;), as.character()))
  df
  #&gt; # A tibble: 3 × 3
  #&gt;       x y         z        
  #&gt;   &lt;int&gt; &lt;list&gt;    &lt;list&gt;   
  #&gt; 1     1 &lt;chr [0]&gt; &lt;chr [1]&gt;
  #&gt; 2     2 &lt;chr [0]&gt; &lt;chr [1]&gt;
  #&gt; 3     3 &lt;chr [0]&gt; &lt;chr [0]&gt;
  </code></pre>
  <p><sup>Created on 2022-02-15 by the <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex package</a> (v2.0.1)</sup></p>
  <p>I want my tibble to look like this</p>
  <pre><code>#&gt; # A tibble: 3 × 3
  #&gt;       x  z        
  #&gt;    &lt;int&gt; &lt;list&gt;   
  #&gt; 1     1 &lt;chr [1]&gt;
  #&gt; 2     2 &lt;chr [1]&gt;
  #&gt; 3     3    NA
  
  </code></pre>
  <p>any help is appreciated</p>