script_analyse.R 628 bytes
#!/usr/bin/env Rscript
library(here)
library(argparser, quietly=TRUE)
source(file.path(dirname(here()), 'init.R'))
# Create a parser
p = arg_parser("Analyse data.")
# Add command line arguments
p = add_argument(p, '--filedir',
                 type="character",
                 help="Directory(ies) in the data directory to search for data.")
p = add_argument(p, '--filename',
                 type="character",
                 help="Filename(s) in the data directory to search for data. If 'all', the whole directory(ies) will used.")
# Parse the command line arguments
argv = parse_args(p)
# Run approriate function