title: Performing a left join on multiple columns, one of which is a partial string
body: <p>I'm attempting to join by a) the first two characters of a first name, b) last name, and c) year. I was doing some reading on fuzzyjoin, but it doesn't seem like it's quite what I need. </p>
  
  <p>I've tried</p>
  
  <pre><code>newly_joined_df &lt;- names_df %&gt;%
      left_join(values_df, by = c(substr("first_name", 1, 2), "last_name", "year")
  </code></pre>
  
  <p>And </p>
  
  <pre><code>newly_joined_df &lt;- names_df %&gt;%
      left_join(values_df, by = c(substr(names_df$first_name, 1, 2), "last_name", "year")
  </code></pre>
  
  <p>But both were dumb solutions, and threw obvious errors.</p>