Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bias correction bug? Code with example datasets is not functional->Error in if (class(x) != "matrix" & class(y) != "matrix") { : the condition has length > 1 #90

Open
durutti opened this issue May 6, 2022 · 0 comments

Comments

@durutti
Copy link

durutti commented May 6, 2022

I recently installed R 4.2 and reinstalled all the packages
I ran the example provided with biascorrection and I get the error

require(climate4R.datasets)

data("EOBS_Iberia_pr")
data("CORDEX_Iberia_pr")
y <- EOBS_Iberia_pr
x <- CORDEX_Iberia_pr
eqm1win <- biasCorrection(y = y, x = x,

  •                       precipitation = TRUE,
    
  •                       method = "eqm",
    
  •                       extrapolation = "none",
    
  •                       window = c(30, 15),
    
  •                       wet.threshold = 0.1)
    

[2022-05-06 15:31:45] Trying to determine the time zone...
[2022-05-06 15:31:45] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
[2022-05-06 15:31:45] Trying to determine the time zone...
[2022-05-06 15:31:45] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
[2022-05-06 15:31:46] Trying to determine the time zone...
[2022-05-06 15:31:46] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
Error in if (class(x) != "matrix" & class(y) != "matrix") { :
the condition has length > 1

sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8
[10] LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] climate4R.datasets_0.0.1 downscaleR_3.3.3 raster_3.5-15 sp_1.4-7
[5] gtools_3.9.2 fields_13.3 viridis_0.6.2 viridisLite_0.4.0
[9] spam_2.8-0 pracma_2.3.8 visualizeR_1.6.1 transformeR_2.1.4
[13] loadeR_1.7.2 climate4R.UDG_0.2.3 loadeR.java_1.1.1 rJava_1.0-6

@durutti durutti changed the title Bias correction doesnt like R 4.2 Bias correction bug? Code with example datasets is not functional May 7, 2022
@durutti durutti changed the title Bias correction bug? Code with example datasets is not functional Bias correction bug? Code with example datasets is not functional->Error in if (class(x) != "matrix" & class(y) != "matrix") { : the condition has length > 1 May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant