Mercurial > repos > greg > r_hello_world
changeset 4:f3737c086298 draft
Uploaded
author | greg |
---|---|
date | Mon, 15 Aug 2016 14:17:51 -0400 |
parents | 8d61cf6f8d6f |
children | a11f7a342777 |
files | hello_world.R |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)