-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.r-project.org/R/trunk@87561 00db46b3-68df-0310-9c12-caf00c1e9a41
- Loading branch information
maechler
committed
Jan 10, 2025
1 parent
2719357
commit 5c9afb5
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* R : A Computer Language for Statistical Data Analysis | ||
* Copyright (C) 2012-2023 The R Core Team | ||
* Copyright (C) 2012-2025 The R Core Team | ||
* Copyright (C) 2003 The R Foundation | ||
* Copyright (C) 1995-2002 Martin Maechler <[email protected]> | ||
* | ||
|
@@ -213,9 +213,10 @@ R_xlen_t R_firstNA_dbl(const double x[], R_xlen_t n) { | |
// .Call()ed from ../R/runmed.R | ||
SEXP runmed(SEXP sx, SEXP stype, SEXP sk, SEXP end, SEXP naAct, SEXP printLev) | ||
{ | ||
if (TYPEOF(sx) != REALSXP) error("numeric 'x' required"); | ||
double *x = REAL(sx), *xx; | ||
R_xlen_t n = XLENGTH(sx); | ||
int nprot = 1; | ||
if (!isReal(sx)) {sx = PROTECT(coerceVector(sx, REALSXP)); nprot++;} | ||
double *x = REAL(sx), *xx; | ||
int type = asInteger(stype), | ||
k = asInteger(sk), | ||
end_rule = asInteger(end), | ||
|
@@ -315,6 +316,6 @@ SEXP runmed(SEXP sx, SEXP stype, SEXP sk, SEXP end, SEXP naAct, SEXP printLev) | |
default: error(_("na_action logic error (%d), please report!"), na_action); | ||
} | ||
} | ||
UNPROTECT(1); | ||
UNPROTECT(nprot); | ||
return ans; | ||
} |