The R Project SVN R-packages

Rev

Rev 4639 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4639 Rev 4963
Line 46... Line 46...
46
      containing NULL or a \code{\link{character}} vector length
46
      containing NULL or a \code{\link{character}} vector length
47
      equal the corresponding \code{Dim} element.}
47
      equal the corresponding \code{Dim} element.}
48
  }
48
  }
49
}
49
}
50
\section{Methods}{
50
\section{Methods}{
51
%   There are (relatively simple) group methods (see, e.g., \code{\link{Arith}})
51
  There is a bunch of coercion methods (for \code{\link{as}(..)}), e.g.,
52
%   \describe{
-
 
53
%     \item{Arith}{\code{signature(e1 = "dMatrix", e2 = "dMatrix")}: ... }
-
 
54
%     \item{Arith}{\code{signature(e1 = "dMatrix", e2 = "numeric")}: ... }
-
 
55
%     \item{Arith}{\code{signature(e1 = "numeric", e2 = "dMatrix")}: ... }
-
 
56
%     \item{Math}{\code{signature(x = "dMatrix")}: ... }
-
 
57
%     \item{Math2}{\code{signature(x = "dMatrix", digits = "numeric")}:
-
 
58
%       this group contains \code{\link{round}()} and \code{\link{signif}()}.}
-
 
59
%     \item{Compare}{\code{signature(e1 = "numeric", e2 = "dMatrix")}: ... }
-
 
60
%     \item{Compare}{\code{signature(e1 = "dMatrix", e2 = "numeric")}: ... }
-
 
61
%     \item{Compare}{\code{signature(e1 = "dMatrix", e2 = "dMatrix")}: ... }
-
 
62
%     \item{Summary}{\code{signature(x = "dMatrix")}: The \code{"Summary"}
-
 
63
%       group contains the seven functions
-
 
64
%       \code{\link{max}()}, \code{\link{min}()}, \code{\link{range}()},
-
 
65
%       \code{\link{prod}()}, \code{\link{sum}()},
-
 
66
%       \code{\link{any}()}, and \code{\link{all}()}.}
-
 
67
%   }
-
 
68
% The following methods are defined for all n* matrices:
-
 
69
  \describe{
52
  \describe{
70
    \item{coerce}{\code{signature(from = "nMatrix", to = "matrix")}: ... }
53
    \item{coerce}{\code{signature(from = "nMatrix", to = "matrix")}: ... }
-
 
54
    \item{coerce}{\code{signature(from = "nMatrix", to = "dMatrix")}: ... }
-
 
55
    \item{coerce}{\code{signature(from = "nMatrix", to = "lMatrix")}: ... }
-
 
56
 
-
 
57
    \item{coerce}{\code{signature(from = "matrix", to = "nMatrix")}: ... }
-
 
58
    \item{coerce}{\code{signature(from = "dMatrix", to = "nMatrix")}: ... }
-
 
59
    \item{coerce}{\code{signature(from = "lMatrix", to = "nMatrix")}: ... }
71
  }
60
  }
72
}
61
}
73
%\references{}
-
 
74
%\author{Martin + Doug}
-
 
75
\seealso{
62
\seealso{
76
%   The classes \code{\linkS4class{dgeMatrix}},
63
The classes \code{\linkS4class{lMatrix}}, and the mother class',
77
%   \code{\linkS4class{dgCMatrix}}, and
-
 
78
%% FIXME
-
 
79
\code{\linkS4class{Matrix}}.
64
\code{\linkS4class{Matrix}}.
80
}
65
}
81
\examples{
66
\examples{
82
 showClass("nMatrix")
67
 showClass("nMatrix")
83
 
68
 
-
 
69
L3 <- Matrix(upper.tri(diag(3)))
-
 
70
L3 # an "ltCMatrix"
-
 
71
as(L3, "nMatrix") # -> ntC*
-
 
72
 
-
 
73
## similar, not using Matrix()
-
 
74
as(upper.tri(diag(3)), "nMatrix")# currently "ngTMatrix"
84
}
75
}
85
\keyword{classes}
76
\keyword{classes}
86
\keyword{algebra}
77
\keyword{algebra}