SCM

SCM Repository

[matrix] Annotation of /pkg/man/Matrix-class.Rd
ViewVC logotype

Annotation of /pkg/man/Matrix-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1673 - (view) (download) (as text)

1 : bates 10 \name{Matrix-class}
2 :     \docType{class}
3 :     \alias{Matrix-class}
4 : maechler 956 \alias{-,Matrix,missing-method}
5 :     \alias{+,Matrix,missing-method}
6 : bates 683 \alias{\%*\%,Matrix,numeric-method}
7 :     \alias{\%*\%,numeric,Matrix-method}
8 : maechler 925 \alias{\%*\%,Matrix,Matrix-method}
9 : maechler 1189 % "[" are in ./Xtrct-methods.Rd <<<<<<<<
10 : maechler 908 \alias{cbind2,Matrix,Matrix-method}
11 :     \alias{cbind2,Matrix,NULL-method}
12 :     \alias{cbind2,Matrix,missing-method}
13 :     \alias{cbind2,NULL,Matrix-method}
14 : maechler 925 \alias{rbind2,Matrix,Matrix-method}
15 :     \alias{rbind2,Matrix,NULL-method}
16 :     \alias{rbind2,Matrix,missing-method}
17 :     \alias{rbind2,NULL,Matrix-method}
18 : bates 683 \alias{crossprod,Matrix,numeric-method}
19 : maechler 925 \alias{crossprod,Matrix,ANY-method}
20 : maechler 1331 \alias{crossprod,Matrix,Matrix-method}
21 : bates 683 \alias{crossprod,numeric,Matrix-method}
22 : maechler 1331 \alias{tcrossprod,ANY,Matrix-method}
23 :     \alias{tcrossprod,Matrix,numeric-method}
24 :     \alias{tcrossprod,Matrix,ANY-method}
25 :     \alias{tcrossprod,Matrix,Matrix-method}
26 :     \alias{tcrossprod,numeric,Matrix-method}
27 :     %
28 : maechler 1654 \alias{chol,Matrix,ANY-method}
29 :     \alias{determinant,Matrix,ANY-method}
30 : maechler 1315 \alias{diag,Matrix-method}
31 : maechler 1329 \alias{head,Matrix-method}
32 :     \alias{tail,Matrix-method}
33 : maechler 1659 \alias{solve,Matrix,matrix-method}
34 : maechler 1665 \alias{solve,Matrix,missing-method}
35 : bates 683 \alias{solve,Matrix,numeric-method}
36 : maechler 611 \alias{dim,Matrix-method}
37 :     \alias{dimnames,Matrix-method}
38 :     \alias{dimnames<-,Matrix,list-method}
39 : bates 10 \alias{show,Matrix-method}
40 : maechler 956 \alias{as.array,Matrix-method}
41 : maechler 658 \alias{as.matrix,Matrix-method}
42 : maechler 956 \alias{as.vector,Matrix,missing-method}
43 : maechler 1389 \alias{as.numeric,Matrix-method}
44 :     \alias{as.logical,Matrix-method}
45 : maechler 946 \alias{t,Matrix-method}
46 : maechler 658 \alias{unname,Matrix-method}
47 : maechler 1548 \alias{coerce,Matrix,matrix-method}%
48 : maechler 1618 \alias{coerce,matrix,Matrix-method}
49 : maechler 1331 \alias{coerce,Matrix,denseMatrix-method}
50 :     \alias{coerce,Matrix,sparseMatrix-method}
51 : maechler 1654 \alias{Ops,Matrix,Matrix-method}
52 :     \alias{Ops,Matrix,ANY-method}
53 :     \alias{Ops,ANY,Matrix-method}
54 : maechler 1655 \alias{Ops,Matrix,matrix-method}
55 :     \alias{Ops,matrix,Matrix-method}
56 : maechler 956 \alias{crossprod,ANY,Matrix-method}
57 :     \alias{kronecker,ANY,Matrix-method}
58 :     \alias{kronecker,Matrix,ANY-method}
59 : maechler 946 %
60 : maechler 664 \title{Virtual Class "Matrix" Class of Matrices}
61 : maechler 502 \description{
62 : maechler 611 The \code{Matrix} class is a class contained by all actual
63 : maechler 664 classes in the \pkg{Matrix} package. It is a \dQuote{virtual} class.
64 : maechler 502 }
65 : maechler 538 \section{Slots}{
66 : maechler 956 Common to \emph{all} matrix objects in the package:
67 : maechler 538 \describe{
68 :     \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
69 :     of the matrix - must be an integer vector with exactly two
70 :     non-negative values.}
71 :     \item{\code{Dimnames}:}{list of length two; each component
72 :     containing NULL or a \code{\link{character}} vector length
73 :     equal the corresponding \code{Dim} element.}
74 :     }
75 : maechler 502 }
76 : bates 10 \section{Methods}{
77 :     \describe{
78 : maechler 611 \item{dim}{\code{signature(x = "Matrix")}: extract matrix dimensions
79 :     \code{\link{dim}}.}
80 :     \item{dimnames}{\code{signature(x = "Matrix")}: extract
81 :     \code{\link{dimnames}}.}
82 :     \item{dimnames<-}{\code{signature(x = "Matrix", value = "list")}: set
83 :     the \code{dimnames} to a \code{\link{list}} of length 2, see
84 :     \code{\link{dimnames<-}}.}
85 :     \item{show}{\code{signature(object = "Matrix")}: \code{\link{show}}
86 :     method for \code{\link{print}}ing.}
87 : maechler 1329 \item{head}{\code{signature(object = "Matrix")}: return only the
88 :     \emph{\dQuote{head}}, i.e., the first few rows.}
89 :     \item{tail}{\code{signature(object = "Matrix")}: return only the
90 :     \emph{\dQuote{tail}}, i.e., the last few rows of the respective matrix.}
91 : maechler 956 \cr %------------------------------------
92 :     \item{as.matrix, as.array}{\code{signature(x = "Matrix")}: the same as
93 :     \code{as(x, "matrix")}; see also the note below.}
94 :     \item{as.vector}{\code{signature(x = "Matrix", mode = "missing")}:
95 :     \code{as.vector(m)} should be identical to \code{as.vector(as(m,
96 :     "matrix"))}, implemented more efficiently for some subclasses.}
97 : bates 10 }
98 : maechler 1290 There are many more methods that (conceptually should) work for all
99 :     \code{"Matrix"} objects, e.g., \code{\link{colSums}},
100 :     \code{\link{rowMeans}}. Even \pkg{base} functions may work
101 :     automagically (if they first call \code{\link{as.matrix}()} on their
102 :     principal argument), e.g., \code{\link{apply}}, \code{\link{eigen}},
103 :     \code{\link{svd}} or \code{\link{kappa}} all do work via coercion to a
104 :     \dQuote{traditional} (dense) \code{\link{matrix}}.
105 :     %% --> ../tests/base-matrix-fun.R
106 : bates 10 }
107 : maechler 956 \note{
108 :     Loading the \code{Matrix} namespace \dQuote{overloads}
109 :     \code{\link{as.matrix}} and \code{\link{as.array}} in the \pkg{base}
110 :     namespace by the equivalent of \code{function(x) as(x, "matrix")}.
111 :     Consequently, \code{as.matrix(m)} or \code{as.array(m)} will properly
112 :     work when \code{m} inherits from the \code{"Matrix"} class ---
113 :     \emph{also} for functions in package \pkg{base} and other packages.
114 :     E.g., \code{\link{apply}} or \code{\link{outer}} can therefore be applied
115 :     to \code{"Matrix"} matrices.
116 :     }
117 : bates 10 %\references{}
118 : maechler 956 \author{Douglas Bates \email{bates@stat.wisc.edu} and Martin Maechler}
119 : bates 10 \seealso{
120 : maechler 1281 the classes \code{\linkS4class{dgeMatrix}},
121 :     \code{\linkS4class{dgCMatrix}}, and function
122 : maechler 502 \code{\link{Matrix}} for construction (and examples).
123 : bates 10 }
124 : maechler 1182 \examples{
125 : maechler 956 slotNames("Matrix")
126 :    
127 :     cl <- getClass("Matrix")
128 :     names(cl@subclasses) # more than 40 ..
129 :    
130 :     showClass("Matrix")#> output with slots and all subclasses
131 :     }
132 : bates 10 \keyword{classes}
133 :     \keyword{algebra}

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge