Mercurial > repos > greg > r_hello_world
view hello_world.R @ 11:887b76c1b7d1 draft default tip
Deleted selected files
author | greg |
---|---|
date | Tue, 16 Aug 2016 09:51:53 -0400 |
parents | 5875cb5f42d4 |
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)