| Line 1... |
Line 1... |
| 1 |
% File src/library/base/man/noquote.Rd
|
1 |
% File src/library/base/man/noquote.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2017 R Core Team
|
3 |
% Copyright 1995-2018 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{noquote}
|
6 |
\name{noquote}
|
| 7 |
\alias{noquote}
|
7 |
\alias{noquote}
|
| 8 |
\alias{print.noquote}
|
8 |
\alias{print.noquote}
|
| Line 14... |
Line 14... |
| 14 |
Print character strings without quotes.
|
14 |
Print character strings without quotes.
|
| 15 |
}
|
15 |
}
|
| 16 |
\usage{
|
16 |
\usage{
|
| 17 |
noquote(obj, right = FALSE)
|
17 |
noquote(obj, right = FALSE)
|
| 18 |
|
18 |
|
| 19 |
\method{print}{noquote}(x, \dots)
|
19 |
\method{print}{noquote}(x, quote = FALSE, right = FALSE, \dots)
|
| 20 |
|
20 |
|
| 21 |
\method{c}{noquote}(\dots, recursive = FALSE)
|
21 |
\method{c}{noquote}(\dots, recursive = FALSE)
|
| 22 |
}
|
22 |
}
|
| 23 |
\arguments{
|
23 |
\arguments{
|
| 24 |
\item{obj}{any \R object, typically a vector of
|
24 |
\item{obj}{any \R object, typically a vector of
|
| 25 |
\code{\link{character}} strings.}
|
25 |
\code{\link{character}} strings.}
|
| 26 |
\item{right}{optional \code{\link{logical}} eventually to be passed to
|
26 |
\item{right}{optional \code{\link{logical}} eventually to be passed to
|
| 27 |
\code{print()}, used by \code{\link{print.default}()}, indicating
|
27 |
\code{print()}, used by \code{\link{print.default}()}, indicating
|
| 28 |
whether or not strings should be right aligned.}
|
28 |
whether or not strings should be right aligned.}
|
| 29 |
\item{x}{an object of class \code{"noquote"}.}
|
29 |
\item{x}{an object of class \code{"noquote"}.}
|
| 30 |
\item{\dots}{further options passed to next methods, such as \code{\link{print}}.}
|
30 |
\item{quote, \dots}{further options passed to next methods, such as \code{\link{print}}.}
|
| 31 |
\item{recursive}{for compatibility with the generic \code{\link{c}} function.}
|
31 |
\item{recursive}{for compatibility with the generic \code{\link{c}} function.}
|
| 32 |
}
|
32 |
}
|
| 33 |
\details{
|
33 |
\details{
|
| 34 |
\code{noquote} returns its argument as an object of class
|
34 |
\code{noquote} returns its argument as an object of class
|
| 35 |
\code{"noquote"}. There is a method for \code{c()} and subscript
|
35 |
\code{"noquote"}. There is a method for \code{c()} and subscript
|
| 36 |
method (\code{"[.noquote"}) which ensures that the class is not lost
|
36 |
method (\code{"[.noquote"}) which ensures that the class is not lost
|
| 37 |
by subsetting. The print method (\code{print.noquote}) prints
|
37 |
by subsetting. The print method (\code{print.noquote}) prints
|
| 38 |
character strings \emph{without} quotes (\code{"\dots"}).
|
38 |
character strings \emph{without} quotes (\code{"\dots"}).
|
| 39 |
|
39 |
|
| - |
|
40 |
If \code{right} is specified in a call \code{print(x, right=*)}, it
|
| - |
|
41 |
takes precedence over a possible \code{right} setting of \code{x},
|
| - |
|
42 |
e.g., created by \code{x <- noquote(*, right=TRUE)}.
|
| - |
|
43 |
|
| 40 |
These functions exist both as utilities and as an example of using (S3)
|
44 |
These functions exist both as utilities and as an example of using (S3)
|
| 41 |
\code{\link{class}} and object orientation.
|
45 |
\code{\link{class}} and object orientation.
|
| 42 |
}
|
46 |
}
|
| 43 |
\author{Martin Maechler \email{maechler@stat.math.ethz.ch}}
|
47 |
\author{Martin Maechler \email{maechler@stat.math.ethz.ch}}
|
| 44 |
\seealso{
|
48 |
\seealso{
|
| Line 61... |
Line 65... |
| 61 |
|
65 |
|
| 62 |
chmat <- as.matrix(format(stackloss)) # a "typical" character matrix
|
66 |
chmat <- as.matrix(format(stackloss)) # a "typical" character matrix
|
| 63 |
## noquote(*, right=TRUE) so it prints exactly like a data frame
|
67 |
## noquote(*, right=TRUE) so it prints exactly like a data frame
|
| 64 |
chmat <- noquote(chmat, right = TRUE)
|
68 |
chmat <- noquote(chmat, right = TRUE)
|
| 65 |
chmat
|
69 |
chmat
|
| 66 |
%% \dontshow{ ======== FIXME(?) problem in capture.output()
|
70 |
\dontshow{
|
| 67 |
%% stopifnot(identical(
|
71 |
stopifnot(identical(
|
| 68 |
%% capture.output(stackloss),
|
72 |
capture.output(stackloss),
|
| 69 |
%% capture.output(chmat)))
|
73 |
capture.output(chmat)))
|
| 70 |
%% }%dont
|
74 |
}%dont
|
| 71 |
}
|
75 |
}
|
| 72 |
\keyword{print}
|
76 |
\keyword{print}
|
| 73 |
\keyword{methods}
|
77 |
\keyword{methods}
|
| 74 |
\keyword{utilities}
|
78 |
\keyword{utilities}
|