Skip to content

Commit

Permalink
Bugfix: cases() now fully heeds option check.xor="ignore".
Browse files Browse the repository at this point in the history
  • Loading branch information
melff committed Jul 2, 2017
1 parent 86d29cd commit f882396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/R/cases.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cases <- function(...,check.xor=c("warn","stop","ignore")){
else if(any(done>0)) msg("conditions are not mutually exclusive")
}
never <- colSums(conditions[!na.cond,,drop=FALSE]) == 0
if(any(never)){
if(any(never) && check.xor!="ignore"){
neverlab <- deflabels[never]
if(length(neverlab)==1)
warning("condition ",neverlab," is never satisfied")
Expand Down

0 comments on commit f882396

Please sign in to comment.