# HG changeset patch # User greg # Date 1471285071 14400 # Node ID f3737c086298e7e7958bf93bf8e53f1061f7be2e # Parent 8d61cf6f8d6fd4c0e6104478eac52cdfdbe163b0 Uploaded diff -r 8d61cf6f8d6f -r f3737c086298 hello_world.R --- a/hello_world.R Mon Aug 15 14:14:26 2016 -0400 +++ b/hello_world.R Mon Aug 15 14:17:51 2016 -0400 @@ -7,6 +7,10 @@ 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)