/code>. In base R you could use <code>sprintf()</code>,
but unlike <code>str_pad()</code>, <code>sprintf()</code> has many other
functionalities.</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-1" tabindex="-1"></a><span class="co"># base</span></span>
<span id="cb20-2"><a href="#cb20-2" tabindex="-1"></a><span class="fu">sprintf</span>(<span class="st">&quot;%30s&quot;</span>, <span class="st">&quot;hadley&quot;</span>)</span>
<spa