I'm trying out Rstudio after using R from the command line for years. I'm liking the debugger and editor. However, I'm struggling with running my typical scripts that use command line args (parsing them using commandArgs
). I would expect some ability in Rstudio to hard code some arguments I want passed in when I want to source -- but I can't find that and there must be a different approach. I also was wondering if source
had a way to pass in command line arguments but I don't see any such option on the man page.
How do I source a single R script in Rstudio (in the console) passing in command line arguments to be read with commandArgs
?