Vignettes of package optparse
optparse.pdf
:
optparse Command Line Option Parsing