title: no visible binding for global variable ‘.’
body: <p>I'm currently co-developing an <code>R</code> package using <code>devtools</code>. We use the
  tidyverse <code>%&gt;%</code> and associated <code>purrr</code> and <code>dplyr</code> packages within our
  functions.</p>
  <p>One of our functions is as follows (edited for clarity):</p>
  <pre class="lang-r prettyprint-override"><code>#' Print `cust_modl` object
  #'
  #' @param x A `cust_modl` object.
  #' @param ... Additional arguments passed to `print.cust_modl()` to print the
  #'   object.
  #'
  #' @method print cust_modl
  #' @export
  print.cust_modl &lt;- function(x, ...) {
  
  req_var_nms &lt;- x$var %&gt;%
  purrr::compact(.x = .) %&gt;%
  names(x = .)
  
  comp_var_ind_filt &lt;- req_var_nms %&gt;%
  purrr::map(.x = ., .f = ~ purrr::pluck(x$var, .x))
  
  }
  </code></pre>
  <p>This is currently giving an <code>NOTE</code> in our Github Actions <code>devtools::check()</code> as:</p>
  <pre><code>print.cust_modl: no visible binding for global variable ‘.’
  </code></pre>
  <p>I understand that this error is due to <code>rlang</code> related issues based on <a href="https://community.rstudio.com/t/how-to-solve-no-visible-binding-for-global-variable-note/28887/3?u=shamindras" rel="noreferrer">this helpful post</a>. So typically we use <code>@importFrom rlang .data</code> as suggested and ensure
  that in <code>dplyr</code> we carry the <code>.data$</code> syntax correctly when referencing columns.</p>
  <p>However, it seems that this <code>NOTE</code> was being given by the <code>purrr</code> calls and it is not
  clear how to correct the <code>rlang</code> import for just the <code>.</code> (rather than the usual more explicit
  <code>.data</code> call in <code>dplyr</code>).</p>
  <p>Could anyone please explain how to correctly adjust R package code for the <code>.</code> as called by
  tidyverse packages such as <code>purrr</code>? I understand that we can locally set <code>. &lt;- NULL</code>, but is there a more rigorous way to set this using <code>rlang</code>? Understanding the recommended guidelines here would allow our package to be developed to community standards.</p>
  <p><strong>Disclaimer:</strong> This is now cross-posted from <a href="https://community.rstudio.com/t/no-visible-binding-for-global-variable/99969" rel="noreferrer">here</a>, since it hasn't received a reply in several days.</p>