fix tk_chooseFile

This commit is contained in:
Hollos Roland 2019-12-18 15:42:15 +01:00
parent 038cedfb7c
commit 1f9343c158

View File

@ -45,10 +45,11 @@ getMeteoData1BGC <- function(startYear=2017, endYear=2017, lon=18.8, lat=47.3, t
# With tk_choose.files, it is not working in R Server.
if(is.null(apiFile)){
apiFile <- tk_choose.files(caption = "Please choose the file which contains the CDS API key.")
print(sprintf("Apifile: %s is selected",apiFile))
}
if(is.null(fileDir)){
apiFile <- tk_choose.dir(caption = "Please choose the fileDir.")
fileDir <- tk_choose.dir(caption = "Please choose the fileDir.")
}
apiCodes <- suppressWarnings(readLines(apiFile)[2])