-
Notifications
You must be signed in to change notification settings - Fork 114
/
infoloc.r
60 lines (56 loc) · 2.04 KB
/
infoloc.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
infoloc <- function(loctag,here=getwd()){
loctag = tolower(loctag)
if (loctag == "rolim"){
fullname = "Rolim de Moura, RO"
iata = "rmo"
pathin = paste(here,loctag,"input",sep="/")
pathout = paste(here,loctag,"output",sep="/")
plotout = paste(here,loctag,"plots",sep="/")
prefix = paste(pathin,iata,sep="/")
suffix = ".txt"
}else if (loctag == "ourop"){
fullname = "Ouro Preto d'Oeste, RO"
iata = "fns"
pathin = paste(here,loctag,"input",sep="/")
pathout = paste(here,loctag,"output",sep="/")
plotout = paste(here,loctag,"plots",sep="/")
prefix = paste(pathin,iata,sep="/")
suffix = ".txt"
}else if (loctag == "rebio"){
fullname = "Rebio Jaru, RO"
iata = "rbj"
pathin = paste(here,loctag,"input",sep="/")
pathout = paste(here,loctag,"output",sep="/")
plotout = paste(here,loctag,"plots",sep="/")
prefix = paste(pathin,iata,sep="/")
suffix = ".txt"
}else if (loctag == "pvelho"){
fullname = "Porto Velho, RO"
iata = "pvh"
pathin = paste(here,loctag,"input",sep="/")
pathout = paste(here,loctag,"output",sep="/")
plotout = paste(here,loctag,"plots",sep="/")
prefix = paste(pathin,iata,sep="/")
suffix = ".txt"
}else if (loctag == "vilhena"){
fullname = "Vilhena, RO"
iata = "bvh"
pathin = paste(here,loctag,"input",sep="/")
pathout = paste(here,loctag,"output",sep="/")
plotout = paste(here,loctag,"plots",sep="/")
prefix = paste(pathin,iata,sep="/")
suffix = ".txt"
}else{
fullname = NA
iata = NA
pathin = NA
pathout = NA
plotout = NA
prefix = NA
suffix = NA
warning(paste("The place",loctag,"is not recognised by infoloc.r, NAs added..."))
}#end if
thisplace = list(fullname=fullname,iata=iata,pathin=pathin,pathout=pathout,
plotout=plotout,prefix=prefix,suffix=suffix)
return(thisplace)
} #end function