The R Project SVN R

Rev

Rev 74363 | Rev 77714 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74363 Rev 77436
Line 1... Line 1...
1
% File src/library/base/man/matrix.Rd
1
% File src/library/base/man/matrix.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-2013 R Core Team
3
% Copyright 1995-2019 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{matrix}
6
\name{matrix}
7
\alias{matrix}
7
\alias{matrix}
8
\alias{as.matrix}
8
\alias{as.matrix}
Line 100... Line 100...
100
\seealso{
100
\seealso{
101
  \code{\link{data.matrix}}, which attempts to convert to a numeric
101
  \code{\link{data.matrix}}, which attempts to convert to a numeric
102
  matrix.
102
  matrix.
103
 
103
 
104
  A matrix is the special case of a two-dimensional \code{\link{array}}.
104
  A matrix is the special case of a two-dimensional \code{\link{array}}.
-
 
105
  Currently, only if the environment variable  \code{"_R_CLASS_MATRIX_ARRAY_"} is set to a
-
 
106
  non-empty string, i.e., \code{if(nzchar(Sys.getenv("_R_CLASS_MATRIX_ARRAY_")))} but then
-
 
107
  From \R 4.0.0 on, \code{\link{inherits}(m, "array")} is true for a \code{matrix} \code{m}.
105
}
108
}
106
\examples{
109
\examples{
107
is.matrix(as.matrix(1:10))
110
is.matrix(as.matrix(1:10))
108
!is.matrix(warpbreaks)  # data.frame, NOT matrix!
111
!is.matrix(warpbreaks)  # data.frame, NOT matrix!
109
warpbreaks[1:10,]
112
warpbreaks[1:10,]