Skip to content

Commit

Permalink
improve reported calls on some warning messages
Browse files Browse the repository at this point in the history
port C code for [dpqr]xxx functions to stats
leave .Internals for now, as they are used directly as an optimization by byte-compiler


git-svn-id: https://svn.r-project.org/R/trunk@59447 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed May 26, 2012
1 parent eb4e8d5 commit e430853
Show file tree
Hide file tree
Showing 17 changed files with 940 additions and 146 deletions.
5 changes: 4 additions & 1 deletion doc/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@
When set to \code{TRUE}, error messages will contain the
location of the most recent call containing source reference
information. (Other values are supported as well; see
\code{?options}.
\code{?options}.

\item The NA warning messages from e.g. \code{pchisq} now report the
call to the closure and not that of the \code{.Internal}.
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/library/grDevices/R/device.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ dev.next <-
{
if(!exists(".Devices"))
.Devices <- list("null.device")
num.device <- .External(C_dev.next, as.integer(which))
num.device <- .External(C_devnext, as.integer(which))
names(num.device) <- .Devices[[num.device]]
num.device
}
Expand Down
197 changes: 100 additions & 97 deletions src/library/stats/R/distn.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/library/stats/R/runmed.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runmed <- function(x, k, endrule = c("median","keep","constant"),
if(is.na(n)) stop("invalid value of length(x)")
k <- as.integer(k)
if(is.na(k)) stop("invalid value of 'k'")
if(k < 0) stop("'k' must be positive")
if(k < 0) stop("'k' must be positive")
if(k%%2 == 0)
warning("'k' must be odd! Changing 'k' to ",
k <- as.integer(1+ 2*(k %/% 2)))
Expand Down
2 changes: 1 addition & 1 deletion src/library/stats/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOURCES_C = init.c kmeans.c \
mAR.c pacf.c starma.c port.c family.c sbart.c \
approx.c loglin.c lowess.c massdist.c splines.c lm.c \
complete_cases.c cov.c deriv.c fourier.c model.c optim.c optimize.c \
integrate.c random.c
integrate.c random.c distn.c

SOURCES_F = bsplvd.f bvalue.f bvalus.f loessf.f ppr.f qsbart.f \
sgram.f sinerp.f sslvrg.f stxwx.f \
Expand Down
2 changes: 1 addition & 1 deletion src/library/stats/src/Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SOURCES_C = init.c kmeans.c \
mAR.c pacf.c starma.c port.c family.c sbart.c \
approx.c loglin.c lowess.c massdist.c splines.c lm.c \
complete_cases.c cov.c deriv.c fourier.c model.c optim.c optimize.c \
integrate.c random.c
integrate.c random.c distn.c

SOURCES_F = bsplvd.f bvalue.f bvalus.f loessf.f ppr.f qsbart.f \
sgram.f sinerp.f sslvrg.f stxwx.f \
Expand Down
Loading

0 comments on commit e430853

Please sign in to comment.