diff --git a/R/Utils.R b/R/Utils.R index 4460018139d3bf55bfd8cc3f9b1b2a4f6f17f850..b1240f2464293fbb9db3c7a87fe63c1be434cabc 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -206,7 +206,7 @@ if (Sys.which("cdo")[[1]] == "") { stop("Error: CDO libraries not available") } - cdo_version <- as.numeric_version(strsplit(suppressWarnings(system2("cdo", args = '-V', stderr = TRUE))[[1]], ' ')[[1]][5]) + cdo_version <- as.numeric_version(substr(strsplit(suppressWarnings(system2("cdo", args = '-V', stderr = TRUE))[[1]], ' ')[[1]][5], 1, 5)) } # If the variable to load is 2-d, we need to determine whether: # - interpolation is needed