search for: seen_narm

Displaying 2 results from an estimated 2 matches for "seen_narm".

Did you mean: mean_narm
2023 Apr 14
0
sum(), min(), max(), prod() vs. named arguments in ...
...mbol here? We'll probably need to translate this message, too.) Passing na.rm more than once could be made into an error right away: --- src/main/summary.c (revision 84252) +++ src/main/summary.c (working copy) @@ -409,6 +409,7 @@ attribute_hidden SEXP fixup_NaRm(SEXP args) { + Rboolean seen_NaRm = FALSE; SEXP t, na_value; /* Need to make sure na.rm is last and exists */ @@ -415,7 +416,9 @@ na_value = ScalarLogical(FALSE); for(SEXP a = args, prev = R_NilValue; a != R_NilValue; a = CDR(a)) { if(TAG(a) == R_NaRmSymbol) { + if(seen_NaRm) error("Please specify n...
2023 Apr 16
0
sum(), min(), max(), prod() vs. named arguments in ...
...: > That would be much easier to support, as users should be accustomed to that _not_ working. > --- src/main/summary.c (revision 84252) > +++ src/main/summary.c (working copy) > @@ -409,6 +409,7 @@ > attribute_hidden > SEXP fixup_NaRm(SEXP args) > { > + Rboolean seen_NaRm = FALSE; > SEXP t, na_value; > > /* Need to make sure na.rm is last and exists */ > @@ -415,7 +416,9 @@ > na_value = ScalarLogical(FALSE); > for(SEXP a = args, prev = R_NilValue; a != R_NilValue; a = CDR(a)) { > if(TAG(a) == R_NaRmSymbol) { > +...