very late answer, maybe the library is newer than your question, but what about optparse or getopt?
install.packages('optparse')
?optparse
I tried to get it working (I come from Python and I'm used to the syntax) but in the end I settled for the easier (and working) 'getopt' solution:
install.packages('getopt')
.
.
.
if(require("getopt", quietly=TRUE)) {
opt <- getopt(matrix(c('path', 'p', 1, "character"),
ncol=4, byrow=TRUE))
if(!is.null(opt$path))
path <- opt$path
}
|