title: R: Center output text in R console (R studio and R.app)
body: <p>I am executing some R scripts with a <code>source()</code> command and then flushing the console. The only thing that I want visible in the console is some text with a progress report of the script, after that some progress bars are displayed, all the rest of the code is hidden. I am printing my progress report to the console by manually adding the text using the <code>cat()</code> function as below. </p>
  
  <pre><code>cat("\014")
  cat("  =====================================\n")
  cat("  ========== PROGRESS REPORT ==========\n")
  cat("  =====================================\n")
  cat("\n")
  
  # progress bar implementation
  </code></pre>
  
  <p>What I was wondering: Is there a way to center the text automatically in the middle of the console so that it adjusts dynamically when you resize the window size of the console? I am looking for a way that works both in R Studio and also baseR in Windows and Mac OS X.</p>