Learn R Programming

minimist (version 0.1)

minimist: Parse argument options

Description

This module is the guts of optimist's argument parser without all the fanciful decoration.

Usage

minimist(args = commandArgs())

Arguments

args
a character vector with arguments

Details

Parses a vector of strings (e.g. from commandArgs) into the proper key/value list.

Examples

Run this code
minimist()
minimist(c("-a", "beep", "-b", "boop"))
args = c("-x", "3", "-y", "4", "-n5", "-abc", "--beep=boop", "foo", "bar", "baz")
minimist(args)

Run the code above in your browser using DataLab