title: Is there a way to pull labels from a separate table in tbl_summary?
body: <p>I am using tbl_summary from the gtsummary package to create publication tables summarizing long lists of categorical data from a data table. For publication purposes, tbl_summary allows assigning human readable variable labels instead of variable names using the argument</p>
  <pre><code>label = grade ~ &quot;Tumor Grade&quot;
  </code></pre>
  <p>and for multiple variables in the form of a list:</p>
  <pre><code>label = list(api00 ~ &quot;API in 2000&quot;,
               api99 ~ &quot;API in 1999&quot;,
               api98 ~ &quot;API in 1998&quot;)
  </code></pre>
  <p>However, I have hundreds of variables and the variable names with the corresponding human readable lables are stored in another table altogether.</p>
  <p>How can I create a list of the format above (ie. var_name ~ &quot;Variable label&quot;) from a separate table with those values and pass it into tbl_summary label as argument?</p>
  <p>In other words, I have a table of the format:</p>
  <pre><code>VAR_NAME   VAR_LABEL
  var1       First variable
  var2       Second variable
  ...        ...
  var159     Hundred fifty ninth variable
  </code></pre>
  <p>Is there a way to read this table and pass the arguments to the label function of tbl_summary as a list:</p>
  <pre><code>label = list(VAR_NAME ~ &quot;VAR_LABEL&quot;)
  </code></pre>
  <p>Thanks in advance.</p>