For any kind of complicated scenario, you can always wrap your Rscript inside a regular shell script and take full advantage of powerful command line parsing of Shell arguments (eg. by using getopts)
https://sookocheff.com/post/bash/parsing-bash-script-arguments-with-shopts/
Have a look at this package: https://cran.r-project.org/web/packages/docopt/index.html
if you want to pass the arguments (similar to Unix - bash style), you need to use Rscript, instead of interactive R. Check this
https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/
may be snakemake can do this. It supports passing config files to R.