You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The help text for memisc::cases() states for the parameter check.xor: "checks, whether the case conditions are mutually exclusive and exhaustive".
In case the conditions are not exhaustive check.xor="ignore" does not work. It does issue a warning:
> x <- c(1,2)
> memisc::cases(
+ "1"=x==1,
+ "2"=x==2,
+ "3"=x==3,
+ check.xor="ignore"
+ )
[1] 1 2
Levels: 1 2 3
Warning message:
In memisc::cases(`1` = x == 1, `2` = x == 2, `3` = x == 3, check.xor = "stop") :
condition x == 3 is never satisfied
in cases.R one should probably change (similarly to the check for done):
if(any(never) &&check.xor!="ignore"){
msg<-switch(check.xor,warn=warning,stop=stop)
neverlab<-deflabels[never]
if(length(neverlab)==1)
msg("condition ",neverlab," is never satisfied")
else
msg("conditions ",paste(neverlab,collapse=", ")," are never satisfied")
}
The text was updated successfully, but these errors were encountered:
The help text for memisc::cases() states for the parameter
check.xor
: "checks, whether the case conditions are mutually exclusive and exhaustive".In case the conditions are not exhaustive
check.xor="ignore"
does not work. It does issue a warning:in
cases.R
one should probably change (similarly to the check fordone
):The text was updated successfully, but these errors were encountered: