Mercurial > repos > greg > r_hello_world
annotate hello_world.R @ 3:8d61cf6f8d6f draft
Uploaded
| author | greg |
|---|---|
| date | Mon, 15 Aug 2016 14:14:26 -0400 |
| parents | fa71365e68b6 |
| children | f3737c086298 |
| rev | line source |
|---|---|
| 0 | 1 #!/usr/bin/env Rscript |
| 2 | |
| 3 suppressPackageStartupMessages(library("optparse")) | |
| 4 | |
| 5 | |
| 6 option_list <- list( | |
| 7 make_option(c("-o", "--output"), action="store", help="Output dataset") | |
| 8 ) | |
| 9 | |
| 2 | 10 fileConn<-file(opt$output) |
| 11 writeLines(c("Hello","World"), fileConn) | |
| 12 close(fileConn) | |
| 0 | 13 |
| 2 | 14 |
