Skip to content

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

@durutti

Description

@durutti

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions