-
Notifications
You must be signed in to change notification settings - Fork 0
/
getCommandArgs.R
116 lines (86 loc) · 3.14 KB
/
getCommandArgs.R
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# this file contains functions for generating lists of command arguments for each model results function,
# saving the files to be used later
# make the command arguments file for resultsSPDE
getGPCommandArgs = function(covType=c("exponential", "matern", "mixture"), rangeText=c("01", "05", "1", "mix")) {
gpCommandArgs = list()
i = 1
for(i1 in 1:length(covType)) {
thisCovType=covType[i1]
for(i2 in 1:length(rangeText)) {
thisRangeText = rangeText[i2]
if(thisCovType == "mixture" && thisRangeText != "mix")
next
else if(thisCovType != "mixture" && thisRangeText == "mix")
next
gpCommandArgs[[i]] = list(covType=thisCovType, rangeText=thisRangeText)
i=i+1
}
}
save(gpCommandArgs, file="gpCommandArgs.RData")
}
# make the command arguments file for resultsSPDE
getSpdeCommandArgs = function(covType=c("exponential", "matern", "mixture"), rangeText=c("01", "05", "1", "mix")) {
spdeCommandArgs = list()
i = 1
for(i1 in 1:length(covType)) {
thisCovType=covType[i1]
for(i2 in 1:length(rangeText)) {
thisRangeText = rangeText[i2]
if(thisCovType == "mixture" && thisRangeText != "mix")
next
else if(thisCovType != "mixture" && thisRangeText == "mix")
next
spdeCommandArgs[[i]] = list(covType=thisCovType, rangeText=thisRangeText)
i=i+1
}
}
save(spdeCommandArgs, file="spdeCommandArgs.RData")
}
# make the command arguments file for resultsLK
getLKCommandArgs = function(covType=c("exponential", "matern", "mixture"), rangeText=c("01", "05", "1", "mix"),
nLayer=c(3, 4)) {
LKCommandArgs = list()
i = 1
for(i1 in 1:length(covType)) {
thisCovType=covType[i1]
for(i2 in 1:length(rangeText)) {
thisRangeText = rangeText[i2]
if(thisCovType == "mixture" && thisRangeText != "mix")
next
else if(thisCovType != "mixture" && thisRangeText == "mix")
next
for(i3 in 1:length(nLayer)) {
thisnLayer = nLayer[i3]
LKCommandArgs[[i]] = list(covType=thisCovType, rangeText=thisRangeText, nLayer=thisnLayer)
i=i+1
}
}
}
save(LKCommandArgs, file="LKCommandArgs.RData")
}
# make the command arguments file for resultsLKINLA
getLKINLACommandArgs = function(covType=c("exponential", "matern", "mixture"), rangeText=c("01", "05", "1", "mix"),
nLayer=c(3, 4)) {
LKINLACommandArgs = list()
i = 1
for(i1 in 1:length(covType)) {
thisCovType=covType[i1]
for(i2 in 1:length(rangeText)) {
thisRangeText = rangeText[i2]
if(thisCovType == "mixture" && thisRangeText != "mix")
next
else if(thisCovType != "mixture" && thisRangeText == "mix")
next
for(i3 in 1:length(nLayer)) {
thisnLayer = nLayer[i3]
LKINLACommandArgs[[i]] = list(covType=thisCovType, rangeText=thisRangeText, nLayer=thisnLayer)
i=i+1
}
}
}
save(LKINLACommandArgs, file="LKINLACommandArgs.RData")
}
# getGPCommandArgs()
# getSpdeCommandArgs()
# getLKCommandArgs()
# getLKINLACommandArgs()