ISAAKiel / oxcAAR
Showing 1 of 2 files from the diff.

@@ -80,7 +80,17 @@
Loading
80 80
  Sys.chmod(exe, mode = "0777")
81 81
82 82
  # set path
83 -
  setOxcalExecutablePath(exe)
83 +
  test <- tryCatch(setOxcalExecutablePath(exe),
84 +
                   error=function(e) {
85 +
                     message("The Oxcal executable path could not be set:")
86 +
                     message(e)
87 +
                     message("\nIf you received an internet connection error before, please resolve it and try again later")
88 +
                   }
89 +
  )
90 +
  if (!is.null(test) && test==0) {
91 +
    message("Oxcal Setup successful!")
92 +
  }
93 +
84 94
85 95
  return()
86 96
}
@@ -89,10 +99,19 @@
Loading
89 99
## ---------- private ----------
90 100
downloadOxcal <- function(path = ".") {
91 101
  temp <- tempfile()
92 -
  utils::download.file("https://c14.arch.ox.ac.uk/OxCalDistribution.zip", temp)
93 -
  utils::unzip(temp, exdir = path)
94 -
  unlink(temp)
95 -
  message("Oxcal download to ", normalizePath(path), " successful!")
102 +
103 +
  test <- tryCatch(utils::download.file("https://c14.arch.ox.ac.uk/OxCalDistribution.zip", temp),
104 +
            warning=function(e) {
105 +
              message("Error Downloading OxCalDistribution.zip:")
106 +
              message(e)
107 +
              message("\nNo internet connection or data source broken?")
108 +
            }
109 +
  )
110 +
  if (!is.null(test) && test==0) {
111 +
    utils::unzip(temp, exdir = path)
112 +
    unlink(temp)
113 +
    message("Oxcal stored successful at ", normalizePath(path), "!")
114 +
  }
96 115
}
97 116
98 117
getOxcalExecutablePath <- function() {
Files Coverage
R 66.23%
Project Totals (13 files) 66.23%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading