view hello_world.R @ 6:24ccb9f7b637 draft

Uploaded
author greg
date Mon, 15 Aug 2016 14:20:27 -0400
parents a11f7a342777
children d48f590690fe
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)
opt <- args$options

fileConn<-file(opt$output)
writeLines(c("Hello","World"), fileConn)
close(fileConn)