Skip to content

Commit

Permalink
use asRbool to catch misuse, e.g. in min(na.rm =)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87777 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Feb 21, 2025
1 parent 1f130d4 commit 7f6be6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/summary.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1997--2023 The R Core Team
* Copyright (C) 1997--2025 The R Core Team
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -579,7 +579,7 @@ attribute_hidden SEXP do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
#endif

ans = matchArgExact(R_NaRmSymbol, &args);
Rboolean narm = asLogical(ans);
Rboolean narm = asRbool(ans, call);

if (ALTREP(CAR(args)) && CDDR(args) == R_NilValue &&
(CDR(args) == R_NilValue || TAG(CDR(args)) == R_NaRmSymbol)) {
Expand Down

0 comments on commit 7f6be6c

Please sign in to comment.