Skip to content

Commit 7f6be6c

Browse files
author
ripley
committed
use asRbool to catch misuse, e.g. in min(na.rm =)
git-svn-id: https://svn.r-project.org/R/trunk@87777 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 1f130d4 commit 7f6be6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/summary.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* R : A Computer Language for Statistical Data Analysis
3-
* Copyright (C) 1997--2023 The R Core Team
3+
* Copyright (C) 1997--2025 The R Core Team
44
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
55
*
66
* This program is free software; you can redistribute it and/or modify
@@ -579,7 +579,7 @@ attribute_hidden SEXP do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
579579
#endif
580580

581581
ans = matchArgExact(R_NaRmSymbol, &args);
582-
Rboolean narm = asLogical(ans);
582+
Rboolean narm = asRbool(ans, call);
583583

584584
if (ALTREP(CAR(args)) && CDDR(args) == R_NilValue &&
585585
(CDR(args) == R_NilValue || TAG(CDR(args)) == R_NaRmSymbol)) {

0 commit comments

Comments
 (0)