optparse: a command line parser inspired by Python's optparse library
argparse: a command line optional and positional argument parser (inspired by Python's argparse library). This package requires that a Python interpreter be installed with the argparse and json (or simplejson) modules.
Update:
docopt: lets you define a command line interface by just giving it a description in the specific format. It is a port a docopt.py.
argparser: cross-platform command-line argument parser written purely in R with no external dependencies. This package is useful with the Rscript front-end and facilitates turning an R script into an executable script.
minimist: A binding to the minimist JavaScript library. This module implements the guts of optimist's argument parser without all the fanciful decoration (no external dependencies)
optigrab: parse options from the command-line using a simple, clean syntax. It requires little or no specification and supports short and long options, GNU-, Java- or Microsoft- style syntaxes, verb commands and more.
I generally prefer to code R so that I don't get warnings, but I don't know how to avoid getting a warning when using as.numeric to convert a character vector.
For example:
x <- as.numeric(c("1", "2", "X"))
…
How do I scrape html tables using the XML package?
Take, for example, this wikipedia page on the Brazilian soccer team. I would like to read it in R and get the "list of all matches Brazil have played against …
In R we all know it is convenient for those times we want to ensure we are dealing with an integer to specify it using the "L" suffix like this:
1L
# [1] 1
If we don't explicitly tell R we want an …