Mercurial > repos > greg > r_hello_world
view hello_world.R @ 8:5875cb5f42d4 draft
Uploaded
author | greg |
---|---|
date | Mon, 15 Aug 2016 14:25:31 -0400 |
parents | d48f590690fe |
children |
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)