-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.R
More file actions
28 lines (23 loc) · 698 Bytes
/
run.R
File metadata and controls
28 lines (23 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#*****************************
#Title: Alpha Swap
#Author: Aleksandar Damjanovic
#Date: 23.11.2021
#*****************************
source('alphaSwap.R', chdir = TRUE)
args= commandArgs(trailingOnly = TRUE)
if(length(args)==0){
stop('You must provide an input in order for script to continue.')
}else{
dict<-alphaSwap_init()
if(args[1]== '-raw' && length(args)>1){
raw<-parseRaw(args[2])
print(raw)
}else if(args[1]=='-txt' && length(args)>1){
parseTxt(args[2])
}else if(args[1]=='-doc' && length(args)>1){
parseWord(args[2])
}else if(args[1]=='-pdf' && length(args)>1){
parsePdf(args[2])
}else if(args[1]=='-dir' && length(args)>1){
parseDir(args[2])
}