Skip to content

Commit a8582f8

Browse files
author
maechler
committed
deprecate corIdent(); new Version: 3.1-162
git-svn-id: https://svn.r-project.org/R-packages/trunk@8184 694ef91d-65df-0310-b7bb-92e67a308ead
1 parent e6c4eb8 commit a8582f8

12 files changed

+44
-28
lines changed

nlme/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2023-01-28 Martin Maechler <[email protected]>
2+
3+
* DESCRIPTION (Version): 3.1-162 (to be released)
4+
5+
* R/corStruct.R (corIdent, *.corIdent): deprecated corIdent() and
6+
some of the "corIdent" methods.
7+
* man/nlme-deprecated.Rd: deprecation
8+
19
2023-01-26 Sebastian Meyer <[email protected]>
210

311
* src/matrix.h: fix return value in C declaration of Fortran

nlme/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: nlme
2-
Version: 3.1-161
3-
Date: 2022-11-18
2+
Version: 3.1-162
3+
Date: 2023-01-28
44
Priority: recommended
55
Title: Linear and Nonlinear Mixed Effects Models
66
Authors@R: c(person("José", "Pinheiro", role = "aut", comment = "S version"),

nlme/NAMESPACE

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ importFrom("lattice",
2828
export(ACF, allCoef, asOneFormula, asTable, augPred, balancedGrouped,
2929
"coef<-", "coefficients<-", collapse, compareFits,
3030
comparePred, corAR1, corARMA, corCAR1, corCompSymm,
31-
corExp, corFactor, corGaus, corIdent, corLin, corMatrix,
31+
corExp, corFactor, corGaus
32+
, corIdent # deprecated
33+
, corLin, corMatrix,
3234
corNatural, corRatio, corSpatial, corSpher, corSymm,
3335
"covariate<-", Dim, fdHess, fixed.effects, fixef, gapply,
3436
getCovariate, getCovariateFormula, getData, getGroups,
@@ -78,7 +80,6 @@ S3method(coef, corAR1)
7880
S3method(coef, corARMA)
7981
S3method(coef, corCAR1)
8082
S3method(coef, corCompSymm)
81-
S3method(coef, corIdent)
8283
S3method(coef, corLin)
8384
S3method(coef, corNatural)
8485
S3method(coef, corSpatial)
@@ -113,7 +114,6 @@ S3method("coef<-", corAR1)
113114
S3method("coef<-", corARMA)
114115
S3method("coef<-", corCAR1)
115116
S3method("coef<-", corCompSymm)
116-
S3method("coef<-", corIdent)
117117
S3method("coef<-", corNatural)
118118
S3method("coef<-", corSpatial)
119119
S3method("coef<-", corStruct)
@@ -148,7 +148,6 @@ S3method(corMatrix, corAR1)
148148
S3method(corMatrix, corARMA)
149149
S3method(corMatrix, corCAR1)
150150
S3method(corMatrix, corCompSymm)
151-
S3method(corMatrix, corIdent)
152151
S3method(corMatrix, corNatural)
153152
S3method(corMatrix, corSpatial)
154153
S3method(corMatrix, corStruct)
@@ -228,7 +227,6 @@ S3method(Initialize, corAR1)
228227
S3method(Initialize, corARMA)
229228
S3method(Initialize, corCAR1)
230229
S3method(Initialize, corCompSymm)
231-
S3method(Initialize, corIdent)
232230
S3method(Initialize, corLin)
233231
S3method(Initialize, corNatural)
234232
S3method(Initialize, corSpatial)
@@ -259,7 +257,6 @@ S3method(lme, groupedData)
259257
S3method(lme, lmList)
260258
S3method(lmList, formula)
261259
S3method(lmList, groupedData)
262-
S3method(logDet, corIdent)
263260
S3method(logDet, corStruct)
264261
S3method(logDet, pdBlocked)
265262
S3method(logDet, pdCompSymm)
@@ -401,7 +398,6 @@ S3method(recalc, corAR1)
401398
S3method(recalc, corARMA)
402399
S3method(recalc, corCAR1)
403400
S3method(recalc, corCompSymm)
404-
S3method(recalc, corIdent)
405401
S3method(recalc, corNatural)
406402
S3method(recalc, corSpatial)
407403
S3method(recalc, corStruct)
@@ -436,7 +432,6 @@ S3method(summary, corCAR1)
436432
S3method(summary, corCompSymm)
437433
S3method(summary, corExp)
438434
S3method(summary, corGaus)
439-
S3method(summary, corIdent)
440435
S3method(summary, corLin)
441436
S3method(summary, corNatural)
442437
S3method(summary, corRatio)
@@ -500,3 +495,11 @@ S3method(varWeights, varComb)
500495
S3method(varWeights, varFunc)
501496
S3method(vcov, gls)
502497
S3method(vcov, lme)
498+
499+
## deprecated:
500+
S3method("coef<-", corIdent)
501+
S3method(summary, corIdent)
502+
S3method(recalc, corIdent)
503+
S3method(logDet, corIdent)
504+
S3method(Initialize, corIdent)
505+
S3method(corMatrix, corIdent)

nlme/R/corStruct.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,14 +771,15 @@ summary.corNatural <-
771771
object
772772
}
773773

774-
###*# corIdent - independent structure
774+
###*# corIdent - independent structure === DEPRECATED
775775

776776
####* Constructor
777777

778778
corIdent <-
779779
## Constructor for the corIdent class
780780
function(form = NULL)
781781
{
782+
.Deprecated("corAR1(0, *)", "nlme")
782783
value <- numeric(0)
783784
attr(value, "formula") <- form
784785
attr(value, "fixed") <- TRUE
@@ -791,6 +792,7 @@ corIdent <-
791792
corMatrix.corIdent <-
792793
function(object, covariate = getCovariate(object), corr, ...)
793794
{
795+
.Deprecated(package="nlme", old = "corMatrix.corIdent(): \"corIdent\" class")
794796
if(is.list(covariate)) {# by group
795797
as.list(lapply(covariate, function(el, object) corMatrix(object, el)))
796798
} else {
@@ -808,6 +810,7 @@ coef.corIdent <-
808810
Initialize.corIdent <-
809811
function(object, data, ...)
810812
{
813+
.Deprecated(package="nlme", old = "Initialize.corIdent(): \"corIdent\" class")
811814
attr(object, "logDet") <- 0
812815
object
813816
}
@@ -819,6 +822,7 @@ recalc.corIdent <- function(object, conLin, ...) conLin
819822
summary.corIdent <-
820823
function(object, structName = "Independent", ...)
821824
{
825+
.Deprecated(package="nlme", old = "summary.corIdent(): \"corIdent\" class")
822826
summary.corStruct(object, structName)
823827
}
824828

nlme/man/Initialize.corStruct.Rd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
\alias{Initialize.corCAR1}
1414
\alias{Initialize.corCompSymm}
1515
\alias{Initialize.corHF}
16-
\alias{Initialize.corIdent}
1716
\alias{Initialize.corLin}
1817
\alias{Initialize.corNatural}
1918
\alias{Initialize.corSpatial}

nlme/man/coef.corStruct.Rd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
\alias{coef.corCAR1}
1515
\alias{coef.corCompSymm}
1616
\alias{coef.corHF}
17-
\alias{coef.corIdent}
1817
\alias{coef.corLin}
1918
\alias{coef.corNatural}
2019
\alias{coef.corSpatial}
@@ -27,7 +26,6 @@
2726
\alias{coef<-.corCompSymm}
2827
\alias{coef<-.corNatural}
2928
\alias{coef<-.corHF}
30-
\alias{coef<-.corIdent}
3129
\alias{coef<-.corLin}
3230
\alias{coef<-.corSpatial}
3331
\alias{coef<-.corSpher}

nlme/man/corClasses.Rd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
\name{corClasses}
66
\title{Correlation Structure Classes}
77
\alias{corClasses}
8-
\alias{corIdent}
98
\alias{corStruct}
109
\description{
1110
Standard classes of correlation structures (\code{corStruct})
12-
available in the \code{nlme} package.
11+
available in the \code{nlme} package.
1312
}
1413
\value{
1514
Available standard classes:
@@ -22,16 +21,17 @@
2221
constant correlation.}
2322
\item{corExp}{exponential spatial correlation.}
2423
\item{corGaus}{Gaussian spatial correlation.}
24+
% \item{corIdent}{Identity matrix (trivial zero) correlation. \bold{Deprecated}.}
2525
\item{corLin}{linear spatial correlation.}
2626
\item{corRatio}{Rational quadratics spatial correlation.}
2727
\item{corSpher}{spherical spatial correlation.}
2828
\item{corSymm}{general correlation matrix, with no additional
29-
structure.}
29+
structure.}
3030
}
3131

3232
\references{
3333
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models
34-
in S and S-PLUS", Springer.
34+
in S and S-PLUS", Springer.
3535
}
3636
\author{José Pinheiro and Douglas Bates \email{bates@stat.wisc.edu}}
3737

@@ -40,7 +40,7 @@
4040
\code{constructor} function and, at a minimum, methods for the
4141
functions \code{corMatrix} and \code{coef}. For
4242
examples of these functions, see the methods for classes \code{corSymm}
43-
and \code{corAR1}.
43+
and \code{corAR1}.
4444
}
4545
\seealso{
4646
\code{\link{corAR1}}, \code{\link{corARMA}},

nlme/man/corMatrix.corStruct.Rd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
\alias{corMatrix.corARMA}
1414
\alias{corMatrix.corCAR1}
1515
\alias{corMatrix.corCompSymm}
16-
\alias{corMatrix.corIdent}
1716
\alias{corMatrix.corNatural}
1817
\alias{corMatrix.corSpatial}
1918
\alias{corMatrix.corSymm}

nlme/man/logDet.corStruct.Rd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
\method{logDet}{corStruct}(object, covariate, \dots)
1010
}
1111
\alias{logDet.corStruct}
12-
\alias{logDet.corIdent}
1312
\arguments{
1413
\item{object}{an object inheriting from class \code{"\link{corStruct}"},
1514
representing a correlation structure.}

nlme/man/nlme-deprecated.Rd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,26 @@
99
%% said to be deprecated in 2018-08, with warning since 2023-01
1010
\alias{nfGroupedData}
1111
\alias{nmGroupedData}
12+
\alias{corIdent}
1213

1314
\usage{
1415
## internal functions wrapped by groupedData()
1516
nfGroupedData(formula, data, order.groups, FUN, outer, inner,
1617
labels, units)
1718
nmGroupedData(formula, data, order.groups, FUN, outer, inner,
1819
labels, units)
20+
## trivial "identity" correlation:
21+
corIdent(form = NULL)
1922
}
2023

2124
\description{
2225
These functions are provided for compatibility with older versions of
2326
\pkg{nlme} only, and may be defunct as soon as the next release.
2427
}
2528

29+
\examples{
30+
tools::assertWarning(verbose=TRUE, csId <- corIdent(~ 1 | Subject))
31+
tools::assertWarning(verbose=TRUE, csI. <- Initialize(csId, data = Orthodont))
32+
tools::assertCondition( corMatrix(csI.), "error", "warning")# quietly, catching warning
33+
}
2634
\keyword{internal}

nlme/man/recalc.corStruct.Rd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
\alias{recalc.corCAR1}
1414
\alias{recalc.corCompSymm}
1515
\alias{recalc.corHF}
16-
\alias{recalc.corIdent}
1716
\alias{recalc.corNatural}
1817
\alias{recalc.corSpatial}
1918
\alias{recalc.corSymm}

nlme/man/summary.corStruct.Rd

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
\alias{summary.corCompSymm}
1515
\alias{summary.corExp}
1616
\alias{summary.corGaus}
17-
\alias{summary.corIdent}
1817
\alias{summary.corLin}
1918
\alias{summary.corNatural}
2019
\alias{summary.corRatio}
@@ -27,9 +26,9 @@
2726
\item{structName}{an optional character string defining the type of
2827
correlation structure associated with \code{object}, to be used in
2928
the \code{print.summary} method. Defaults to
30-
\code{class(object)[1]}.}
29+
\code{class(object)[1]}.}
3130
\item{\dots}{some methods for this generic require additional
32-
arguments. None are used in this method.}
31+
arguments. None are used in this method.}
3332
}
3433
\description{
3534
This method function prepares \code{object} to be printed using the
@@ -44,10 +43,10 @@
4443
}
4544
\author{José Pinheiro and Douglas Bates }
4645
\seealso{
47-
\code{\link{corClasses}},
46+
\code{\link{corClasses}},
4847
\code{\link{corNatural}},
49-
\code{\link{Initialize.corStruct}},
50-
\code{\link{summary}}
48+
\code{\link{Initialize.corStruct}},
49+
\code{\link{summary}}
5150
}
5251

5352
%\seealso{\code{\link{print.summary.corStruct}}}

0 commit comments

Comments
 (0)