Closed bodirsky closed 4 years ago
Did you run that part of code with metadata activated (withMetadata()=TRUE
)?
It looks to me that the metadata check for units failed in this case. If so, I would like to close the issue as metadata handling is still experimental and needs a major overhaul before it can be used productively.
I forgot to mention: the line tmp | (mstat==f)
is probably not very efficient but should work properly as it is executed in a for loop over all states filter. Hence, each filter state is tested separately, so that a vector of filter variables does not cause any problems with the ==
statement
beim ausführen der Funktion getReportMAgPIE2LPJmL in magpie4 bekomme ich folgenden Fehler in der subroutine .filtermagpie
Error in Ops.units(u1, u2) : operation | not allowed
die funktion ist folgende:
.tmp <- function(mstat,filter) { tmp <- FALSE for(f in filter) { tmp <- tmp | (mstat==f) } return(tmp) }
ich verstehen auch nciht was das hier tmp | (mstat==f) zurückliefern soll.
GLO 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
ich glaube das geht nur mit einem modelstat, kann das sein?