SCM

SCM Repository

[matrix] Diff of /pkg/man/sparseMatrix-class.Rd
ViewVC logotype

Diff of /pkg/man/sparseMatrix-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1946, Wed Jul 4 18:38:25 2007 UTC revision 1947, Thu Jul 5 08:22:00 2007 UTC
# Line 62  Line 62 
62  }  }
63  \section{Methods}{  \section{Methods}{
64    \describe{    \describe{
 %% FIXME: better description of print() / show(); notably explain the  
 %% print() arguments !  
65      \item{show}{\code{(object = "sparseMatrix")}: The      \item{show}{\code{(object = "sparseMatrix")}: The
66        \code{\link{show}} method for sparse matrices prints        \code{\link{show}} method for sparse matrices prints
67        \emph{\dQuote{structural}} zeroes as \code{"."} using the        \emph{\dQuote{structural}} zeroes as \code{"."} using
68        non-exported \code{prSpMatrix} function which allows further        \code{\link{printSpMatrix}()} which allows further customization.}
69        customization such as replacing \code{"."} by \code{" "} (blank).      \item{print}{\code{signature(x = "sparseMatrix")}, ....\cr
70          The \code{\link{print}} method for sparse matrices by default is the
71        Note that \code{\link{options}(max.print)} will influence how many        same as \code{show()} but can be called with extra optional
72        entries of large matrices are printed at all.}        arguments, see \code{\link{printSpMatrix}()}.}
     \item{print}{\code{signature(x = "sparseMatrix")}, extra arguments  
       \code{digits = getOption("digits"), maxp = getOption("max.print"),  
         zero.print = ".", col.names = FALSE, note.dropping.colnames = TRUE,  
         col.trailer = '', align = c("fancy", "right")}: The  
       \code{\link{print}} method for sparse matrices by default is the  
       same as \code{show()} but can be called with extra optional arguments.}  
   
73      \item{summary}{\code{(object = "sparseMatrix")}: Returns      \item{summary}{\code{(object = "sparseMatrix")}: Returns
74        an object of S3 class \code{"sparseSummary"} which is basically a        an object of S3 class \code{"sparseSummary"} which is basically a
75        \code{\link{data.frame}} with columns \code{(i,j,x)} with the        \code{\link{data.frame}} with columns \code{(i,j,x)} with the
# Line 119  Line 110 
110  (fact <- gl(5, 3, 30, labels = LETTERS[1:5]))  (fact <- gl(5, 3, 30, labels = LETTERS[1:5]))
111  (Xt <- as(fact, "sparseMatrix"))  # indicator rows  (Xt <- as(fact, "sparseMatrix"))  # indicator rows
112  X <- t(Xt)  X <- t(Xt)
 ## printing :  
 X ## <==>  show(X)  <==>  print(X)  
 print(X, zero.print = "", col.names = TRUE)  
   
 \dontshow{% show() was slow in 0.9975-8 because of slow adjust="fancy"  
 op <- options(max.print = 25000, width = 80)  
 sink(print(tempfile()))  
 stopifnot((st <- system.time(show(M)))[1] < 1.0) # only 0.09 on cmath-3  
 sink()  
 st  
 options(op)  
 }  
113  }  }
114  \keyword{classes}  \keyword{classes}

Legend:
Removed from v.1946  
changed lines
  Added in v.1947

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