Skip to content

Commit

Permalink
remove historical remarks about S-PLUS compatibility
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@85835 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jan 28, 2024
1 parent 11111d7 commit b7e9be9
Show file tree
Hide file tree
Showing 23 changed files with 71 additions and 90 deletions.
6 changes: 2 additions & 4 deletions src/library/base/man/Random.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/Random.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2021 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{Random}
Expand Down Expand Up @@ -92,9 +92,7 @@ set.seed(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
We use the implementation by Reeds \emph{et al} (1982--84).

The two seeds are the Tausworthe and congruence long integers,
respectively. A one-to-one mapping to S's \code{.Random.seed[1:12]}
is possible but we will not publish one, not least as this generator
is \bold{not} exactly the same as that in recent versions of S-PLUS.
respectively.

It exhibits 25 clear failures in the TestU01 Crush suite (\emph{L'Ecuyer}, 2007).
}
Expand Down
16 changes: 8 additions & 8 deletions src/library/base/man/cbind.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/cbind.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2023 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{cbind}
Expand Down Expand Up @@ -100,13 +100,13 @@ rbind(\dots, deparse.level = 1)
The \code{rbind} data frame method first drops all zero-column and
zero-row arguments. (If that leaves none, it returns the first
argument with columns otherwise a zero-column zero-row data frame.)
It then takes the classes of the columns from the
first data frame, and matches columns by name (rather than by
position). Factors have their levels expanded as necessary (in the
order of the levels of the level sets of the factors encountered) and
the result is an ordered factor if and only if all the components were
ordered factors. (The last point differs from S-PLUS.) Old-style
categories (integer vectors with levels) are promoted to factors.
It then takes the classes of the columns from the first data frame,
and matches columns by name (rather than by position). Factors have
their levels expanded as necessary (in the order of the levels of the
level sets of the factors encountered) and the result is an ordered
factor if and only if all the components were ordered factors.
Old-style categories (integer vectors with levels) are promoted to
factors.

Note that for result column \code{j}, \code{\link{factor}(., exclude = X(j))}
is applied, where \preformatted{ X(j) := if(isTRUE(factor.exclude)) {
Expand Down
4 changes: 2 additions & 2 deletions src/library/base/man/chartr.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/chartr.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2020 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{chartr}
Expand Down Expand Up @@ -44,7 +44,7 @@ casefold(x, upper = FALSE)
to a single upper-case character.

\code{casefold} is a wrapper for \code{tolower} and \code{toupper}
provided for compatibility with S-PLUS.
originally written for compatibility with S-PLUS.
}
\value{
A character vector of the same length and with the same attributes as
Expand Down
2 changes: 0 additions & 2 deletions src/library/base/man/class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ oldClass(x) <- value
}

\note{
Functions \code{oldClass} and \code{oldClass<-} behave in the same way
as functions of those names in S-PLUS 5/6, \emph{but} in \R
\code{\link{UseMethod}} dispatches on the class as returned by
\code{class} (with some interpolated classes: see the link) rather
than \code{oldClass}. \emph{However}, \link{group generic}s dispatch
Expand Down
8 changes: 4 additions & 4 deletions src/library/base/man/file.access.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/file.access.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2023 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{file.access}
Expand Down Expand Up @@ -54,10 +54,10 @@ file.access(names, mode = 0)
}
\note{
This is intended as a replacement for the S-PLUS function
This was written as a replacement for the S-PLUS function
\code{access}, a wrapper for the C function of the same name, which
explains the return value encoding. Note that
the return value is \bold{false} for \bold{success}.
explains the return value encoding. Note that the return value is
\bold{false} for \bold{success}.
}
\seealso{
Expand Down
5 changes: 2 additions & 3 deletions src/library/base/man/make.names.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/make.names.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2013 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{make.names}
Expand Down Expand Up @@ -51,8 +51,7 @@ make.names(names, unique = FALSE, allow_ = TRUE)
work. Use \code{allow_ = FALSE} for back-compatibility.
\code{allow_ = FALSE} is also useful when creating names for export to
applications which do not allow underline in names (for example,
S-PLUS and some DBMSes).
applications which do not allow underline in names (such as some DBMSes).
}
\seealso{
\code{\link{make.unique}},
Expand Down
4 changes: 2 additions & 2 deletions src/library/datasets/man/iris.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/datasets/man/iris.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2023 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{iris}
Expand All @@ -25,7 +25,7 @@ iris3
\code{Petal.Length}, \code{Petal.Width}, and \code{Species}.
\code{iris3} gives the same data arranged as a 3-dimensional array
of size 50 by 4 by 3, as represented by S-PLUS. The first dimension
of size 50 by 4 by 3, as once provided by S-PLUS. The first dimension
gives the case number within the species subsample, the second the
measurements with names \code{Sepal L.}, \code{Sepal W.},
\code{Petal L.}, and \code{Petal W.}, and the third the species.
Expand Down
4 changes: 2 additions & 2 deletions src/library/datasets/man/longley.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/datasets/man/longley.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2014 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{longley}
Expand Down Expand Up @@ -43,7 +43,7 @@
}
\examples{
require(stats); require(graphics)
## give the data set in the form it is used in S-PLUS:
## give the data set in the form it was used in S-PLUS:
longley.x <- data.matrix(longley[, 1:6])
longley.y <- longley[, "Employed"]
pairs(longley, main = "longley data")
Expand Down
10 changes: 5 additions & 5 deletions src/library/datasets/man/stackloss.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/datasets/man/stackloss.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2007 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{stackloss}
Expand Down Expand Up @@ -31,10 +31,10 @@ stack.loss
[,4] \tab \code{stack.loss} \tab Stack loss\cr
}
For compatibility with S-PLUS, the data sets \code{stack.x}, a matrix
with the first three (independent) variables of the data frame, and
\code{stack.loss}, the numeric vector giving the fourth (dependent)
variable, are provided as well.
For historical compatibility with S-PLUS, the data sets
\code{stack.x}, a matrix with the first three (independent) variables
of the data frame, and \code{stack.loss}, the numeric vector giving
the fourth (dependent) variable, are also provided.
}
\source{
Brownlee, K. A. (1960, 2nd ed.\sspace{}1965)
Expand Down
2 changes: 1 addition & 1 deletion src/library/stats/man/ar.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ar.mle(x, aic = TRUE, order.max = NULL, na.action = na.fail,
\code{ar.burg} allows two methods to estimate the innovations
variance and hence AIC. Method 1 is to use the update given by
the Levinson-Durbin recursion (Brockwell and Davis, 1991, (8.2.6)
on page 242), and folloeds S-PLUS. Method 2 is the mean of the sum
on page 242), and follows S-PLUS. Method 2 is the mean of the sum
of squares of the forward and backward prediction errors
(as in Brockwell and Davis, 1996, page 145). Percival and Walden
(1998) discuss both. In the multivariate case the estimated
Expand Down
21 changes: 8 additions & 13 deletions src/library/stats/man/arima.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ arima(x, order = c(0L, 0L, 0L),
\deqn{X_t= a_1 X_{t-1}+\cdots+ a_p X_{t-p} + e_t + b_1 e_{t-1}+\cdots+b_q e_{t-q}
}{X[t] = a[1]X[t-1] + \dots + a[p]X[t-p] + e[t] + b[1]e[t-1] + \dots + b[q]e[t-q]}

and so the MA coefficients differ in sign from those used by S-PLUS.
Further, if \code{include.mean} is true (the default for an ARMA
model), this formula applies to \eqn{X - m} rather than \eqn{X}. For
ARIMA models with differencing, the differenced series follows a
zero-mean ARMA model. If an \code{xreg} term is included, a linear
regression (with a constant term if \code{include.mean} is true and
there is no differencing) is fitted with an ARMA model for the error
term.
and so the MA coefficients differ in sign from those used in
documentation written for S-PLUS. Further, if \code{include.mean} is
true (the default for an ARMA model), this formula applies to \eqn{X -
m} rather than \eqn{X}. For ARIMA models with differencing, the
differenced series follows a zero-mean ARMA model. If an \code{xreg}
term is included, a linear regression (with a constant term if
\code{include.mean} is true and there is no differencing) is fitted
with an ARMA model for the error term.

The variance matrix of the estimates is found from the Hessian of
the log-likelihood, and so may only be a rough guide.
Expand Down Expand Up @@ -234,11 +234,6 @@ arima(x, order = c(0L, 0L, 0L),
}

\note{
The results are likely to be different from S-PLUS's
\code{arima.mle}, which computes a conditional likelihood and does
not include a mean in the model. Further, the convention used by
\code{arima.mle} reverses the signs of the MA coefficients.
\code{arima} is very similar to \code{\link{arima0}} for
ARMA models or for differenced models without missing values,
but handles differenced models with missing values exactly.
Expand Down
5 changes: 2 additions & 3 deletions src/library/stats/man/cor.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ cov2cor(V)
and gives an error in the other cases.

The denominator \eqn{n - 1} is used which gives an unbiased estimator
of the (co)variance for i.i.d. observations.
These functions return \code{\link{NA}} when there is only one
observation (whereas S-PLUS returned \code{NaN}).
of the (co)variance for i.i.d. observations. These functions return
\code{\link{NA}} when there is only one observation.

For \code{cor()}, if \code{method} is \code{"kendall"} or
\code{"spearman"}, Kendall's \eqn{\tau}{tau} or Spearman's
Expand Down
3 changes: 1 addition & 2 deletions src/library/stats/man/cov.wt.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ cov.wt(x, wt = rep(1/nrow(x), nrow(x)), cor = FALSE, center = TRUE,
The covariance matrix is divided by one minus the sum of squares of
the weights, so if the weights are the default (\eqn{1/n}) the conventional
unbiased estimate of the covariance matrix with divisor \eqn{(n - 1)}
is obtained. This differs from the behaviour in S-PLUS which
corresponded to \code{method = "ML"} and does not divide.
is obtained.
}
\seealso{\code{\link{cov}} and \code{\link{var}}.
}
Expand Down
4 changes: 2 additions & 2 deletions src/library/stats/man/density.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/density.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2023 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{density}
Expand All @@ -27,7 +27,7 @@ density(x, \dots)

\item{bw}{the smoothing bandwidth to be used. The kernels are scaled
such that this is the standard deviation of the smoothing kernel.
(Note this differs from the reference books cited below, and from S-PLUS.)
(Note this differs from the reference books cited below.)

\code{bw} can also be a character string giving a rule to choose the
bandwidth. See \code{\link{bw.nrd}}. \cr The default,
Expand Down
5 changes: 2 additions & 3 deletions src/library/stats/man/kernel.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/kernel.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2014 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{kernel}
Expand Down Expand Up @@ -45,8 +45,7 @@ is.tskernel(k)
}
\details{
\code{kernel} is used to construct a general kernel or named specific
kernels. The modified Daniell kernel halves the end coefficients (as
used by S-PLUS).
kernels. The modified Daniell kernel halves the end coefficients.

The \code{\link{[}} method allows natural indexing of kernel objects
with indices in \code{(-m) : m}. The normalization is such that for
Expand Down
4 changes: 2 additions & 2 deletions src/library/stats/man/plot.spec.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/plot.spec.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2007 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{plot.spec}
Expand Down Expand Up @@ -40,7 +40,7 @@ plot.spec.coherency(x, ci = 0.95,
\item{ci}{coverage probability for confidence interval. Plotting of
the confidence bar/limits is omitted unless \code{ci} is strictly
positive.}
\item{log}{If \code{"dB"}, plot on log10 (decibel) scale (as S-PLUS),
\item{log}{If \code{"dB"}, plot on log10 (decibel) scale,
otherwise use conventional log scale or linear scale. Logical
values are also accepted. The default is \code{"yes"} unless
\code{options(ts.S.compat = TRUE)} has been set, when it is
Expand Down
8 changes: 4 additions & 4 deletions src/library/stats/man/ppr.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/ppr.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2018 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

% file stats/man/ppr.Rd
Expand Down Expand Up @@ -137,9 +137,9 @@ method functions.
\item{model}{(only if \code{model = TRUE}) the model frame.}
}
\details{
The basic method is given by Friedman (1984), and is essentially the
same code used by S-PLUS's \code{ppreg}. This code is extremely
sensitive to the compiler used.
The basic method is given by Friedman (1984) and based on his
code. This code has been shown to be extremely sensitive to the
Fortrancompiler used.
The algorithm first adds up to \code{max.terms} ridge terms one at a
time; it will use less if it is unable to find a term to add that makes
Expand Down
8 changes: 4 additions & 4 deletions src/library/stats/man/princomp.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/princomp.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2018 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{princomp}
Expand Down Expand Up @@ -90,9 +90,9 @@ princomp(x, \dots)
\code{princomp} is a generic function with \code{"formula"} and
\code{"default"} methods.

The calculation is done using \code{\link{eigen}} on the correlation or
covariance matrix, as determined by \code{\link{cor}}. This is done for
compatibility with the S-PLUS result. A preferred method of
The calculation is done using \code{\link{eigen}} on the correlation
or covariance matrix, as determined by \code{\link{cor}}. (This was
done for compatibility with the S-PLUS result.) A preferred method of
calculation is to use \code{\link{svd}} on \code{x}, as is done in
\code{prcomp}.

Expand Down
4 changes: 1 addition & 3 deletions src/library/stats/man/smooth.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/smooth.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2016 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{smooth}
Expand Down Expand Up @@ -48,8 +48,6 @@ smooth(x, kind = c("3RS3R", "3RSS", "3RSR", "3R", "3", "S"),
smoothed values with additional attributes.
}
\note{
S and S-PLUS used a different (somewhat better) Tukey smoother in
\code{smooth(*)}.
Note that there are other smoothing methods which provide
rather better results. These were designed for hand calculations
and may be used mainly for didactical purposes.
Expand Down
13 changes: 7 additions & 6 deletions src/library/stats/man/smooth.spline.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/smooth.spline.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2023 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{smooth.spline}
Expand Down Expand Up @@ -148,11 +148,12 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, lambda = NULL, cv = FALSE,
%% = 1/3 - log(r)/{24 log(2)} + log(lam) / {24 log(2)}
%% = s0 + 0.0601 * log(lam)
Note that from the above relation,
\code{spar} is \eqn{s = s0 + 0.0601 \cdot \log\lambda}{spar = s0 + 0.0601 * log(\lambda)},
which is intentionally \emph{different} from the S-PLUS implementation
of \code{smooth.spline} (where \code{spar} is proportional to
\eqn{\lambda}). In \R's (\eqn{\log \lambda}{log \lambda}) scale, it makes more
sense to vary \code{spar} linearly.
\code{spar} is \eqn{s = s0 + 0.0601 \cdot \log\lambda}{spar = s0 + 0.0601 * log(\lambda)}.
%% which is intentionally \emph{different} from the S-PLUS implementation
%% of \code{smooth.spline} (where \code{spar} is proportional to
%% \eqn{\lambda}).
%% In \R's (\eqn{\log \lambda}{log \lambda}) scale, it makes more
%% sense to vary \code{spar} linearly.

Note however that currently the results may become very unreliable
for \code{spar} values smaller than about -1 or -2. The same may
Expand Down
12 changes: 6 additions & 6 deletions src/library/stats/man/spectrum.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/spectrum.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2008 R Core Team
% Copyright 1995-2024 R Core Team
% Distributed under GPL 2 or later

\name{spectrum}
Expand Down Expand Up @@ -57,11 +57,11 @@ spectrum(x, \dots, method = c("pgram", "ar"))
\code{spectrum} is a wrapper function which calls the methods
\code{\link{spec.pgram}} and \code{\link{spec.ar}}.

The spectrum here is defined with scaling \code{1/\link{frequency}(x)},
following S-PLUS. This makes the spectral density a density over the
range \code{(-frequency(x)/2, +frequency(x)/2]}, whereas a more common
scaling is \eqn{2\pi}{2pi} and range \eqn{(-0.5, 0.5]} (e.g., Bloomfield)
or 1 and range \eqn{(-\pi, \pi]}{(-pi, pi]}.
The spectrum here is defined (for historical compatibility) with
scaling \code{1/\link{frequency}(x)}. This makes the spectral density
a density over the range \code{(-frequency(x)/2, +frequency(x)/2]},
whereas a more common scaling is \eqn{2\pi}{2pi} and range \eqn{(-0.5,
0.5]} (e.g., Bloomfield) or 1 and range \eqn{(-\pi, \pi]}{(-pi, pi]}.

If available, a confidence interval will be plotted by
\code{plot.spec}: this is asymmetric, and the width of the centre
Expand Down
Loading

0 comments on commit b7e9be9

Please sign in to comment.