Mercurial > repos > greg > r_hello_world
view hello_world.R @ 5:a11f7a342777 draft
Uploaded
author | greg |
---|---|
date | Mon, 15 Aug 2016 14:19:09 -0400 |
parents | f3737c086298 |
children | 24ccb9f7b637 |
line wrap: on
line source
#!/usr/bin/env Rscript suppressPackageStartupMessages(library("optparse")) options_list <- list( make_option(c("-o", "--output"), action="store", help="Output dataset") ) parser <- OptionParser(usage="%prog [options] file", options_list) args <- parse+args(parser, positional_arguments=TRUE) opt <- args$options fileConn<-file(opt$output) writeLines(c("Hello","World"), fileConn) close(fileConn)