title: How to attach date in subject of mail using RDCOMClient
body: <p>I need to attach previous day date in subject of mail using RDCOMClient, tried below code but no luck.</p>
  <pre><code>d1=Sys.Date()-1
  
  OutApp &lt;- COMCreate(&quot;Outlook.Application&quot;)
  outMail = OutApp$CreateItem(0)
  outMail[[&quot;To&quot;]] = paste(&quot;anc@xyb.com&quot;)
  
  outMail[[&quot;subject&quot;]] = &quot;Database collection dated&quot; + d1
  
  outMail$Send()
  
  </code></pre>
  <p>error I received is</p>
  <pre><code>Error in &quot;Database collection dated&quot; + &quot;d1&quot; : 
    non-numeric argument to binary operator
  </code></pre>