comparison bmsb.R @ 13:860730afa679 draft

Uploaded
author greg
date Tue, 16 Aug 2016 10:03:49 -0400
parents 99a386ac1f5b
children 5ba47f694b0a
comparison
equal deleted inserted replaced
12:7b0c47f9436a 13:860730afa679
1 #!/usr/bin/env Rscript 1 #!/usr/bin/env Rscript
2 2
3 #suppressPackageStartupMessages(library("optparse")) 3 #suppressPackageStartupMessages(library("optparse"))
4 #suppressPackageStartupMessages(library("rjson")) 4 #suppressPackageStartupMessages(library("rjson"))
5 5
6 option_list <- list( 6 options_list <- list(
7 make_option(c("-s", "--save_log"), action="store_true", default=FALSE, help="Save R logs"), 7 make_option(c("-s", "--save_log"), action="store_true", default=FALSE, help="Save R logs"),
8 make_option(c("-m", "--output_r_log"), action="store", help="Output dataset for R logs"), 8 make_option(c("-m", "--output_r_log"), action="store", help="Output dataset for R logs"),
9 make_option(c("-o", "--output"), action="store", help="Output dataset") 9 make_option(c("-o", "--output"), action="store", help="Output dataset")
10 ) 10 )
11
12 parser <- OptionParser(usage="%prog [options] file", options_list)
13 args <- parse_args(parser, positional_arguments=TRUE)
14 opt <- args$options
15
11 16
12 daylength = function(L){ 17 daylength = function(L){
13 # from Forsythe 1995 18 # from Forsythe 1995
14 p = 0.8333 19 p = 0.8333
15 dl <- NULL 20 dl <- NULL