title: Purrr: Which nested dataframe encountered the error?
body: <p>Here is a nested data.   </p>
  
  <pre><code>df1 &lt;- tibble::tribble(
     ~A,        ~B,  ~group,
     4L,         1L,  "A",
     7L,         4L,  "A",
    NA_integer_, 1L,  "B",
    NA_integer_, 10L, "B")
  
  df2 &lt;- df1 %&gt;% group_by(group) %&gt;% nest()
  </code></pre>
  
  <p>I need to run lm using purrr:map. </p>
  
  <pre><code>map(df2$data, ~lm(A~B, data=.x))
  </code></pre>
  
  <p>What's the best way to find out which nested data encountered an error i.e. how can I know that group B has an issue. </p>
  
  <p>Can you suggest a solution may be using purrr's possibly or safely? </p>