How to have RStudio set R's max-connection parameter to 512 on startup?

This is an open-ended version of this question, that doesn't prescribe a particular approach to answering the question.