title: How to pass an argument in a R function that I want to use to make a join
body: <p>In an R function written with the tidyverse syntax, I would like to pass as argument the name of a variable (without &quot;&quot;) that I want to use to make a join.</p>
  <p>My example below :
  Many thanks in advance !</p>
  <pre><code>table1 &lt;- data.frame(
    name = c(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;),
    especes = c(&quot;setosa&quot;,&quot;versicolor&quot;,&quot;virginica&quot;)
  )
  
  mafonc &lt;- function(var=NULL) {
  
    resultat &lt;- iris %&gt;% left_join(table1,
                                   by =  c(&quot;Species&quot;=var))
    
    return(resultat)
  }
  
  mafonc(var=especes)
  </code></pre>