Skip to content

Commit

Permalink
cosmetic changes, comments
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87291 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Nov 6, 2024
1 parent 4580ec3 commit f4f2a2f
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion etc/Makeconf.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @configure_input@
# @configure_input@ -*- Makefile -*-
#
# ${R_HOME}/etc/Makeconf
#
Expand Down
2 changes: 1 addition & 1 deletion src/library/base/R/connections.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ textConnection <- function(object, open = "r", local = FALSE,
env <- if (local) parent.frame() else .GlobalEnv
type <- match(match.arg(encoding), c("", "bytes", "UTF-8"))
if(!(is.character(name) && length(name) == 1))
stop("'name' must be a single character string")
stop(gettextf("'%s' must be a character string", "name"), domain = NA)
.Internal(textConnection(name, object, open, env, type))
}

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

\name{as.POSIX*}
Expand Down Expand Up @@ -208,7 +208,7 @@ as.POSIXlt(Sys.time(), "Australia/Darwin")
}

tab <- file.path(R.home("share"), "zoneinfo", "zone1970.tab")
if(file.exists(tab)) { # typically on Windows; *not* on Linux
if(file.exists(tab)) { # typically on Windows; on Linux when `configure --with-internal-tzcode`
cols <- c("code", "coordinates", "TZ", "comments")
tmp <- read.delim(tab,
header = FALSE, comment.char = "#", col.names = cols)
Expand Down
5 changes: 3 additions & 2 deletions src/library/base/man/format.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
% Distributed under GPL 2 or later

\name{format}
\title{Encode in a Common Format}
\alias{format}
\alias{format.AsIs}
\alias{format.data.frame}
\alias{format.default}
\alias{format.factor}
\description{
Format an \R object for pretty printing.
Format an \R object for pretty printing, notably encoding vector or
column elements into a common format.
}
\title{Encode in a Common Format}
\usage{
format(x, \dots)

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

\name{list}
Expand Down Expand Up @@ -73,7 +73,7 @@ alist(\dots)
\code{is.list} returns \code{TRUE} if and only if its argument
is a \code{list} \emph{or} a \code{pairlist} of \code{length} \eqn{> 0}.
\code{is.pairlist} returns \code{TRUE} if and only if the argument
is a pairlist or \code{NULL} (see below).
is a pairlist (or \code{NULL} which \emph{is} a pairlist, see below).

The \code{"\link{environment}"} method for \code{as.list} copies the
name-value pairs (for names not beginning with a dot) from an
Expand Down
4 changes: 2 additions & 2 deletions src/library/base/man/qr.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ as.qr(x)
\value{
The QR decomposition of the matrix as computed by LINPACK(*) or LAPACK.
The components in the returned value correspond directly
to the values returned by \I{DQRDC}(2)/\I{DGEQP3}/\I{ZGEQP3}.
to the values returned by \I{DQRDC(2)}/\I{DGEQP3}/\I{ZGEQP3}.
\item{qr}{a matrix with the same dimensions as \code{x}.
The upper triangle contains the \eqn{\bold{R}} of the decomposition
and the lower triangle contains information on the \eqn{\bold{Q}} of
the decomposition (stored in compact form). Note that the storage
used by \I{DQRDC} and \I{DGEQP3} differs.}
used by \I{DQRDC} (LINPACK) and \I{DGEQP3} (LAPACK) differs.}
\item{qraux}{a vector of length \code{ncol(x)} which contains
additional information on \eqn{\bold{Q}}.}
\item{rank}{the rank of \code{x} as computed by the decomposition(*):
Expand Down
2 changes: 1 addition & 1 deletion src/library/base/man/source.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

\code{withAutoprint(exprs)} is a wrapper for \code{source(exprs =
exprs, ..)} with different defaults. Its main purpose is to evaluate
and auto-print expressions as if in a toplevel context, e.g, as in the
and auto-print expressions as if in a top-level context, e.g, as in the
\R console.
}
\usage{
Expand Down
6 changes: 3 additions & 3 deletions src/library/base/man/srcfile.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/srcfile.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{srcfile}
Expand Down Expand Up @@ -155,8 +155,8 @@ srcref(srcfile, lloc)
}
\seealso{
\code{\link{getSrcFilename}} for extracting information from a source
reference, or \code{\link{removeSource}} to remove it from a
(non-primitive) function (aka \sQuote{closure}).
reference, or \code{\link{removeSource}} to remove it from a language
object or a (non-primitive) function (aka \sQuote{closure}).
}
\author{Duncan Murdoch}
\examples{
Expand Down
7 changes: 4 additions & 3 deletions src/library/base/man/strsplit.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/strsplit.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{strsplit}
Expand Down Expand Up @@ -107,11 +107,12 @@ strsplit(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE)
\seealso{
\code{\link{paste}} for the reverse,
\code{\link{grep}} and \code{\link{sub}} for string search and
manipulation; also \code{\link{nchar}}, \code{\link{substr}}.
manipulation; also \code{\link{nchar}}, \code{\link{substr}},
\code{\link{startsWith}()}, and \code{endsWith()}.

\sQuote{\link{regular expression}} for the details of the pattern
specification.

Option \code{PCRE_use_JIT} controls the details when \code{perl = TRUE}.
}
\examples{
Expand Down
1 change: 1 addition & 0 deletions src/library/base/man/substr.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ substring(text, first, last = 1000000L) <- value
Wadsworth & Brooks/Cole. (\code{substring}.)
}
\seealso{
\code{\link{startsWith}} and \code{endsWith()};
\code{\link{strsplit}}, \code{\link{paste}}, \code{\link{nchar}}.
}
\examples{
Expand Down
3 changes: 2 additions & 1 deletion src/library/base/man/write.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ write(x, file = "data",
\item{x}{the data to be written out. }
\item{file}{a \code{\link{connection}}, or a character string naming
the file to write to. If \code{""}, print to the standard output
connection.
connection, i.e., \code{""} is equivalent to \code{\link{stdout}()}
here.

When \code{\link{.Platform}$OS.type != "windows"}, and it
is \code{"|cmd"}, the output is piped to the command given
Expand Down
6 changes: 3 additions & 3 deletions src/library/graphics/man/lines.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/graphics/man/lines.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{lines}
Expand All @@ -23,8 +23,8 @@ lines(x, \dots)
\item{\dots}{Further graphical parameters (see \code{\link{par}}) may
also be supplied as arguments, particularly, line type, \code{lty},
line width, \code{lwd}, color, \code{col} and for \code{type = "b"},
\code{pch}. Also the line characteristics \code{lend}, \code{ljoin}
and \code{lmitre}.}
\code{pch} (see \code{\link{points}} for details). Also the line
characteristics \code{lend}, \code{ljoin} and \code{lmitre}.}
}
\details{
The coordinates can be passed in a plotting structure
Expand Down
6 changes: 3 additions & 3 deletions src/library/stats/man/TDist.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ rt(n, df, ncp)
Lenth, R. V. (1989). \emph{Algorithm AS 243} ---
Cumulative distribution function of the non-central \eqn{t} distribution,
\emph{Applied Statistics} \bold{38}, 185--189.
\emph{Applied Statistics} \bold{38}, 185--189; \doi{10.2307/2347693} .
This computes the lower tail only, so the upper tail currently suffers from
cancellation and a warning will be given when this is likely to be
Expand All @@ -124,12 +124,12 @@ rt(n, df, ncp)
For central \code{qt}, a C translation of
Hill, G. W. (1970) Algorithm 396: Student's t-quantiles.
\emph{Communications of the ACM}, \bold{13(10)}, 619--620. % \doi{10.1145/355598.355599}
\emph{Communications of the ACM}, \bold{13(10)}, 619--620; \doi{10.1145/355598.355599} .

altered to take account of

Hill, G. W. (1981) Remark on Algorithm 396, \emph{ACM Transactions on
Mathematical Software}, \bold{7}, 250--1. % \doi{10.1145/355945.355956}
Mathematical Software}, \bold{7}, 250--1; \doi{10.1145/355945.355956} .

The non-central case is done by inversion.
}
Expand Down
2 changes: 1 addition & 1 deletion src/library/stats/man/integrate.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ integrate(dnorm, 0, 2)
integrate(dnorm, 0, 20)
integrate(dnorm, 0, 200)
integrate(dnorm, 0, 2000)
integrate(dnorm, 0, 20000) ## fails on many systems
integrate(dnorm, 0, 20000) ## "fails" on many systems -- "wrongly" giving '0'
integrate(dnorm, 0, Inf) ## works
\dontshow{tools::assertError(}
integrate(dnorm, 0:1, 20) #-> error!
Expand Down
6 changes: 3 additions & 3 deletions src/library/stats/man/mauchly.test.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/stats/man/mauchly.test.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2007 R Core Team
% Copyright 1995-2023 R Core Team
% Distributed under GPL 2 or later

\name{mauchly.test}
Expand All @@ -16,8 +16,8 @@
mauchly.test(object, ...)
\method{mauchly.test}{mlm}(object, ...)
\method{mauchly.test}{SSD}(object, Sigma = diag(nrow = p),
T = Thin.row(Proj(M) - Proj(X)), M = diag(nrow = p), X = ~0,
idata = data.frame(index = seq_len(p)), ...)
T = Thin.row(Proj(M) - Proj(X)), M = diag(nrow = p), X = ~0,
idata = data.frame(index = seq_len(p)), ...)
}
\arguments{
\item{object}{object of class \code{SSD} or \code{mlm}.}
Expand Down
2 changes: 1 addition & 1 deletion src/library/tools/R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ add_dummies <- function(dir, Log)
as.POSIXct(gsub(".*\"datetime\":\"([^Z]*).*", "\\1", foo),
"UTC", "%Y-%m-%dT%H:%M:%S")
}, error = function(e) NA)
if(identical(NA, now)) {
if(identical(NA, now)) { # try http (no 's')
now <- tryCatch({
foo <- suppressWarnings(readLines("http://worldtimeapi.org/api/timezone/etc/UTC",
warn = FALSE))
Expand Down

0 comments on commit f4f2a2f

Please sign in to comment.