if(!(res%in%c("luftlyr","innoly","frostlyr","d.luft.oslyr","d.eipalyr","d.eimetlyr")))stop("'service' need to be one of these: 'luftlyr','innoly','frostlyr','d.luft.oslyr','d.eipalyr','d.eimetlyr'")
res
},error=function(err){
print(paste("Error in argument 'service': ",err))
print("It will crash.")
})
fromDate<-tryCatch({
res<-as.character(arguments$fromDate)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'fromDate': ",err))
print("It will crash.")
})
toDate<-tryCatch({
res<-as.character(arguments$toDate)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'toDate': ",err))
print("It will crash.")
})
precision<-tryCatch({
res<-as.character(arguments$precision)
if(!(res%in%c("second","minute","hourly","daily","monthly","yearly")))stop("'service' need to be one of these: 'second','minute','hourly','daily','monthly','yearly'")
res
},error=function(err){
print(paste("Error in argument 'precision': ",err))
print("It will crash.")
})
timeResolution<-tryCatch({
res<-as.character(arguments$timeResolution)
if(!(res%in%c("second","minute","hourly","daily","monthly","yearly")))stop("'service' need to be one of these: 'second','minute','hourly','daily','monthly','yearly'")
res
},error=function(err){
print(paste("Error in argument 'timeResolution': ",err))
print("It will crash.")
})
element_id<-tryCatch({
res<-as.character(arguments$element_id)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'element_id': ",err))
print("It will crash.")
})
station_id<-tryCatch({
res<-as.character(arguments$station_id)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'station_id': ",err))
print("It will crash.")
})
username<-tryCatch({
res<-as.character(arguments$username)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'username': ",err))
print("It will crash.")
})
password<-tryCatch({
res<-as.character(arguments$password)
# add some filter
res
},error=function(err){
print(paste("Error in argument 'password': ",err))
- friendlyr.sh: run friendlyr.R with possibility of asynchronous loop.
- friendlyr.R: Gather data
**Remarks** :
Friendlyr required installation of libraries from NILU's gitlab.
A full frontend version of friendlyr is available through [rØya](https://git.nilu.no/oya/roya) service
### Pre-requisities
#### Get easily command-line interface through Rscript.
In order to get a command-line interface through Rscript, you need to install docopt packages in R.
```R
install.packages("docopt")
```
#### Get the right packages to run the case study
The package batqa and its dependencies enable to optimize a model.
For our case study, and as suggested in batqa DESCRIPTION, need one to install other packages: metrics, friendlyr, d.luft.oslyr, friendlyts and ranger.