SCM

SCM Repository

[matrix] Diff of /pkg/tests/indexing.R
ViewVC logotype

Diff of /pkg/tests/indexing.R

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

revision 1374, Tue Aug 15 18:17:44 2006 UTC revision 2110, Sat Jan 26 20:59:26 2008 UTC
# Line 1  Line 1 
1  #### For both 'Extract' ("[") and 'Replace' ("[<-") Method testing  ## For both 'Extract' ("[") and 'Replace' ("[<-") Method testing
2    
3  library(Matrix)  library(Matrix)
4    
# Line 6  Line 6 
6    
7  ### Dense Matrices  ### Dense Matrices
8    
9  m <- Matrix(1:28, nrow = 7)  m <- Matrix(1:28 +0, nrow = 7)
10  validObject(m) ; m@x <- as.double(m@x) ; validObject(m)  validObject(m)
11  stopifnot(identical(m, m[]),  stopifnot(identical(m, m[]),
12            identical(m[2, 3],  16), # simple number            identical(m[2, 3],  16), # simple number
13            identical(m[2, 3:4], c(16,23))) # simple numeric of length 2            identical(m[2, 3:4], c(16,23))) # simple numeric of length 2
# Line 44  Line 44 
44  m[, 1] <- -1  m[, 1] <- -1
45  m[1:3,]  m[1:3,]
46    
47    m. <- as.matrix(m)
48    
49    ## m[ cbind(i,j) ] indexing:
50    ij <- cbind(1:6, 2:3)
51    stopifnot(identical(m[ij], m.[ij]))
52    
53    ## testing operations on logical Matrices rather more than indexing:
54  g10 <- m [ m > 10 ]  g10 <- m [ m > 10 ]
55  stopifnot(18 == length(g10))  stopifnot(18 == length(g10))
 ## needs R >= 2.3.0 [Buglet in R(<= 2.2.1)'s possibleExtends()]:  
56  stopifnot(10 == length(m[ m <= 10 ]))  stopifnot(10 == length(m[ m <= 10 ]))
57    sel <- (20 <  m) & (m <  150)
58    sel.<- (20 <  m.)& (m.<  150)
59    nsel <-(20 >= m) | (m >= 150)
60    (ssel <- as(sel, "sparseMatrix"))
61    stopifnot(is(sel, "lMatrix"), is(ssel, "lsparseMatrix"),
62              identical3(as.mat(sel.), as.mat(sel), as.mat(ssel)),
63              identical3(!sel, !ssel, nsel), # !<sparse> is typically dense
64              identical3(m[ sel],  m[ ssel], as.matrix(m)[as.matrix( ssel)]),
65              identical3(m[!sel],  m[!ssel], as.matrix(m)[as.matrix(!ssel)])
66              )
67    
68    ## more sparse Matrices --------------------------------------
 ### Sparse Matrices --------------------------------------  
69    
70  m <- 1:800  m <- 1:800
71  set.seed(101) ; m[sample(800, 600)] <- 0  set.seed(101) ; m[sample(800, 600)] <- 0
# Line 66  Line 81 
81  mC[1:2,]  mC[1:2,]
82  mC[7,  drop = FALSE]  mC[7,  drop = FALSE]
83  assert.EQ.mat(mC[1:2,], mm[1:2,])  assert.EQ.mat(mC[1:2,], mm[1:2,])
84  stopifnot(all.equal(mC[,3],   mm[,3]))  
85    ## *repeated* (aka 'duplicated') indices - did not work at all ...
86    i <- rep(8:10,2)
87    j <- c(2:4, 4:3)
88    assert.EQ.mat(mC[i,], mm[i,])
89    assert.EQ.mat(mC[,j], mm[,j])
90    assert.EQ.mat(mC[i, 2:1], mm[i, 2:1])
91    assert.EQ.mat(mC[c(4,1,2:1), j], mm[c(4,1,2:1), j])
92    assert.EQ.mat(mC[i,j], mm[i,j])
93    set.seed(7)
94    for(n in 1:50) {
95        i <- sample(sample(nrow(mC), 7), 20, replace = TRUE)
96        j <- sample(sample(ncol(mC), 6), 17, replace = TRUE)
97        assert.EQ.mat(mC[i,j], mm[i,j])
98    }
99    
100    ##---- Symmetric indexing of symmetric Matrix ----------
101    m. <- mC; m.[, c(2, 7:12)] <- 0
102    validObject(S <- crossprod(add.simpleDimnames(m.) %% 100))
103    ss <- as(S, "matrix")
104    T <- as(S, "TsparseMatrix")
105    ## non-repeated indices:
106    i <- c(7:5, 2:4);assert.EQ.mat(T[i,i], ss[i,i])
107    N <- nrow(T)
108    set.seed(11)
109    for(n in 1:50) {
110        i <- sample(N, max(2, sample(N,1)), replace = FALSE)
111        validObject(Tii <- T[i,i])
112        stopifnot(is(Tii, "dsTMatrix"), # remained symmetric Tsparse
113                  identical(t(Tii), t(T)[i,i]))
114        assert.EQ.mat(Tii, ss[i,i])
115    }
116    
117    ## repeated ones ``the challenge'' (to do smartly):
118    j <- c(4, 4, 9, 12, 9, 4, 17, 3, 18, 4, 12, 18, 4, 9)
119    assert.EQ.mat(T[j,j], ss[j,j])
120    ## and another two sets  (a, A) &  (a., A.) :
121    a <- matrix(0, 6,6)
122    a[upper.tri(a)] <- (utr <- c(2, 0,-1, 0,0,5, 7,0,0,0, 0,0,-2,0,8))
123    ta <- t(a); ta[upper.tri(a)] <- utr; a <- t(ta)
124    diag(a) <- c(0,3,0,4,6,0)
125    A <- as(Matrix(a), "TsparseMatrix")
126    A. <- A
127    diag(A.) <- 10 * (1:6)
128    a. <- as(A., "matrix")
129    ## More testing {this was not working for a long time..}
130    set.seed(1)
131    for(n in 1:100) {
132        i <- sample(1:nrow(A), 3+2*rpois(1, lam=3), replace=TRUE)
133        Aii  <- A[i,i]
134        A.ii <- A.[i,i]
135        stopifnot(class(Aii) == class(A),
136                  class(A.ii) == class(A.))
137        assert.EQ.mat(Aii , a [i,i])
138        assert.EQ.mat(A.ii, a.[i,i])
139        assert.EQ.mat(T[i,i], ss[i,i])
140    }
141    
142    
143    stopifnot(all.equal(mC[,3], mm[,3]),
144              identical(mC[ij], mm[ij]))
145  assert.EQ.mat(mC[7, , drop=FALSE], mm[7, , drop=FALSE])  assert.EQ.mat(mC[7, , drop=FALSE], mm[7, , drop=FALSE])
146    
147  stopifnot(dim(mC[numeric(0), ]) == c(0,20), # used to give warnings  stopifnot(dim(mC[numeric(0), ]) == c(0,20), # used to give warnings
# Line 86  Line 161 
161            identical3(mm[3,], mC[3,], mT[3,]),            identical3(mm[3,], mC[3,], mT[3,]),
162            identical3(mT[2,3], mC[2,3], 0),            identical3(mT[2,3], mC[2,3], 0),
163            identical(mT[], mT),            identical(mT[], mT),
164            ## TODO: identical4() with  m[c(3,7), 2:4] - fail because of 'dimnames'            identical4(       mm[c(3,7), 2:4],  as.mat( m[c(3,7), 2:4]),
165            ## TODO: identical3() with as(mC[c(3,7), 2:4],"matrix"),                       as.mat(mT[c(3,7), 2:4]), as.mat(mC[c(3,7), 2:4]))
           ##       fails because of 'dimnames'  
           identical(mm[c(3,7), 2:4], as(mT[c(3,7), 2:4],"matrix"))  
166            )            )
167    
168  x.x <- crossprod(mC)  x.x <- crossprod(mC)
169  stopifnot(class(x.x) == "dsCMatrix",  stopifnot(class(x.x) == "dsCMatrix",
170            class(x.x. <- round(x.x / 10000)) == "dsCMatrix")            class(x.x. <- round(x.x / 10000)) == "dsCMatrix",
171              identical(x.x[cbind(2:6, 2:6)],
172                        diag(x.x [2:6, 2:6])))
173  head(x.x.) # Note the *non*-structural 0's printed as "0"  head(x.x.) # Note the *non*-structural 0's printed as "0"
174  ## FIXME (once we require 2.4.x or higher):  tail(x.x., -3) # all but the first three lines
 ##  tail(x.x., -2) # the last two lines  
175    
176  lx.x <- as(x.x, "lsCMatrix") # FALSE only for "structural" 0  lx.x <- as(x.x, "lsCMatrix") # FALSE only for "structural" 0
177  if(FALSE) { ## FIXME: needs coercion  "lsCMatrix" to "lgTMatrix"  (l10 <- lx.x[1:10, 1:10])# "lsC"
178      lx.x[1:10, 1:10]  (l3 <-  lx.x[1:3, ])
179      lx.x[1:3, ]  m.x <- as(x.x, "matrix")
180  }  stopifnot(class(l10) == "lsCMatrix", # symmetric indexing -> symmetric !
181              identical(as.mat(lx.x), m.x != 0),
182              identical(as.logical(lx.x), as.logical(m.x)),
183              identical(as.mat(l10), m.x[1:10, 1:10] != 0),
184              identical(as.mat(l3 ), m.x[1:3, ] != 0)
185              )
186    
187    ##-- Sub*assignment* with repeated / duplicated index:
188    A <- Matrix(0,4,3) ; A[c(1,2,1), 2] <- 1 ; A
189    B <- A;              B[c(1,2,1), 2] <- 1:3; B; B. <- B
190    B.[3,] <- rbind(4:2)
191    diag(B.) <- 10 * diag(B.)
192    C <- B.; C[,2] <- C[,2];  C[1,] <- C[1,]; C[2:3,2:1] <- C[2:3,2:1]
193    stopifnot(identical(unname(as.matrix(A)),
194                        local({a <- matrix(0,4,3); a[c(1,2,1), 2] <-  1 ; a})),
195              identical(unname(as.matrix(B)),
196                        local({a <- matrix(0,4,3); a[c(1,2,1), 2] <- 1:3; a})),
197              identical(C, drop0(B.)))
198    
199    
200    ## used to fail
201    n <- 5 ## or much larger
202    sm <- new("dsTMatrix", i=as.integer(1),j=as.integer(1),
203              Dim=as.integer(c(n,n)), x = 1)
204    (cm <- as(sm, "CsparseMatrix"))
205    sm[2,]
206    stopifnot(sm[2,] == c(0:1, rep.int(0,ncol(sm)-2)),
207              sm[2,] == cm[2,],
208              sm[,3] == sm[3,],
209              all(sm[,-(1:3)] == t(sm[-(1:3),])), # all(<lge.>)
210              all(sm[,-(1:3)] == 0)
211              )
212    
213    ### Diagonal -- Sparse:
214    m0 <- Diagonal(5)
215    (m1 <- as(m0, "sparseMatrix"))  # dtTMatrix
216    (m2 <- as(m0, "CsparseMatrix")) # dtCMatrix (with an irrelevant warning)
217    m1g <- as(m1, "generalMatrix")
218    stopifnot(is(m1g, "dgTMatrix"))
219    assert.EQ.mat(m2[1:3,],    diag(5)[1:3,])
220    assert.EQ.mat(m2[,c(4,1)], diag(5)[,c(4,1)])
221    stopifnot(identical(m2[1:3,], as(m1[1:3,], "CsparseMatrix")),
222              identical(Matrix:::uniqTsparse(m1[, c(4,2)]),
223                        Matrix:::uniqTsparse(as(m2[, c(4,2)], "TsparseMatrix")))
224              )## failed in 0.9975-11
225    
226    M <- m0; M[1,] <- 0
227    stopifnot(identical(M, Diagonal(x=c(0, rep(1,4)))))
228    M <- m0; M[,3] <- 3 ; M ; stopifnot(is(M, "sparseMatrix"), M[,3] == 3)
229    validObject(M)
230    M <- m0; M[1:3, 3] <- 0 ;M
231    T <- m0; T[1:3, 3] <- 10
232    stopifnot(identical(M, Diagonal(x=c(1,1, 0, 1,1))),
233              is(T, "triangularMatrix"), identical(T[,3], c(10,10,10,0,0)))
234    
235    M <- m1; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
236    M <- m1; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
237    validObject(M)
238    M <- m1; M[1:3, 3] <- 0 ;M
239    assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
240    T <- m1; T[1:3, 3] <- 10; validObject(T)
241    stopifnot(is(T, "dtTMatrix"), identical(T[,3], c(10,10,10,0,0)))
242    
243    M <- m2; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
244    M <- m2; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
245    validObject(M)
246    M <- m2; M[1:3, 3] <- 0 ;M
247    assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
248    T <- m2; T[1:3, 3] <- 10; validObject(T)
249    stopifnot(is(T, "dtCMatrix"), identical(T[,3], c(10,10,10,0,0)))
250    
251    
252    ## "Vector indices" -------------------
253    D <- Diagonal(6)
254    M <- as(D,"dgeMatrix")
255    m <- as(D,"matrix")
256    s <- as(D,"TsparseMatrix")
257    S <- as(s,"CsparseMatrix")
258    i <- c(3,1,6); v <- c(10,15,20)
259    ## (logical,value) which both are recycled:
260    L <- c(TRUE, rep(FALSE,8)) ; z <- c(50,99)
261    
262    ## vector subassignment, both with integer & logical
263    ## these now work correctly {though not very efficiently; hence warnings}
264    m[i] <- v # the role model: only first column is affected
265    M[i] <- v; assert.EQ.mat(M,m) # dge
266    D[i] <- v; assert.EQ.mat(D,m) # ddi -> dtT -> dgT
267    s[i] <- v; assert.EQ.mat(s,m) # dtT -> dgT
268    S[i] <- v; assert.EQ.mat(S,m); S # dtC -> dtT -> dgT -> dgC
269    ## logical
270    m[L] <- z
271    M[L] <- z; assert.EQ.mat(M,m)
272    D[L] <- z; assert.EQ.mat(D,m)
273    s[L] <- z; assert.EQ.mat(s,m)
274    S[L] <- z; assert.EQ.mat(S,m) ; S
275    
276    ## indexing [i]  vs  [i,] --- now ok
277    stopifnot(identical4(m[i], M[i], D[i], s[i]), identical(s[i],S[i]))
278    stopifnot(identical4(m[L], M[L], D[L], s[L]), identical(s[L],S[L]))
279    assert.EQ.mat(D[i,], m[i,])
280    assert.EQ.mat(M[i,], m[i,])
281    assert.EQ.mat(s[i,], m[i,])
282    assert.EQ.mat(S[i,], m[i,])
283    
284    assert.EQ.mat(D[,i], m[,i])
285    assert.EQ.mat(M[,i], m[,i])
286    assert.EQ.mat(s[,i], m[,i])
287    assert.EQ.mat(S[,i], m[,i])
288    
289    
290  ## --- negative indices ----------  ## --- negative indices ----------
291  mc <- mC[1:5, 1:7]  mc <- mC[1:5, 1:7]
# Line 162  Line 344 
344  mc[-1, 3] <- -2:1 # 0 should not be entered; 'value' recycled  mc[-1, 3] <- -2:1 # 0 should not be entered; 'value' recycled
345  mt[-1, 3] <- -2:1  mt[-1, 3] <- -2:1
346  stopifnot(mc@x != 0, mt@x != 0,  stopifnot(mc@x != 0, mt@x != 0,
347            mc[-1,3] == -2:1, mt[-1,3] == -2:1) ##--> BUG -- fixed            mc[-1,3] == -2:1, mt[-1,3] == -2:1) ## failed earlier
348    
349  ev <- 1:5 %% 2 == 0  mc0 <- mc
350  mc[ev, 3] <- 0:1  mt0 <- as(mc0, "TsparseMatrix")
351  if(FALSE)## FIXME  m0  <- as(mc0, "matrix")
352   stopifnot(mc[ev, 3] == 0:1) ##-> BUG  {very peculiar; the 2nd time it works ...}  set.seed(1)
353  validObject(mc)  for(i in 1:50) {
354  mc # now shows a non-structural zeros      mc <- mc0; mt <- mt0 ; m <- m0
355        ev <- 1:5 %% 2 == round(runif(1))# 0 or 1
356        j <- sample(ncol(mc), 1 + round(runif(1)))
357        nv <- rpois(sum(ev) * length(j), lambda = 1)
358        mc[ev, j] <- nv
359         m[ev, j] <- nv
360        mt[ev, j] <- nv
361        if(i %% 10 == 1) print(mc[ev,j, drop = FALSE])
362        stopifnot(as.vector(mc[ev, j]) == nv, ## failed earlier...
363                  as.vector(mt[ev, j]) == nv)
364        validObject(mc) ; assert.EQ.mat(mc, m)
365        validObject(mt) ; assert.EQ.mat(mt, m)
366    }
367    
368    mc # no longer has non-structural zeros
369  mc[ii, jj] <- 1:6  mc[ii, jj] <- 1:6
370  mc[c(2,5), c(3,5)] <- 3.2  mc[c(2,5), c(3,5)] <- 3.2
371  validObject(mc)  validObject(mc)
372  (m. <- mc)  m. <- mc
373  if(FALSE)## FIXME:  mc[4,] <- 0
374   mc[4,] <- 0 # -> error -- another Bug  mc
375    
376    S <- as(Diagonal(5),"sparseMatrix")
377  H <- Hilbert(9)  H <- Hilbert(9)
378  Hc <- as(round(H, 3), "dsCMatrix")# a sparse matrix with no 0 ...  Hc <- as(round(H, 3), "dsCMatrix")# a sparse matrix with no 0 ...
379  (trH <- tril(Hc[1:5, 1:5]))  (trH <- tril(Hc[1:5, 1:5]))
380  stopifnot(is(trH, "triangularMatrix"), trH@uplo == "L")  stopifnot(is(trH, "triangularMatrix"), trH@uplo == "L",
381              is(S, "triangularMatrix"))
382    
383    ## triangular assignment
384    ## the slick (but inefficient in case of sparse!) way to assign sub-diagonals:
385    ## equivalent to tmp <- `diag<-`(S[,-1], -2:1); S[,-1] <- tmp
386    ## which dispatches to (x="TsparseMatrix", i="missing",j="index", value="replValue")
387    diag(S[,-1]) <- -2:1 # used to give a wrong warning
388    ## FIXME? the above *could* return triangular -- but for that
389    
390    trH[c(1:2,4), c(2:3,5)] <- 0 # gave an *error* upto Jan.2008
391    trH[ lower.tri(trH) ] <- 0   # ditto, because of callNextMethod()
392    
393    m <- Matrix(0+1:28, nrow = 4)
394    m[-3,c(2,4:5,7)] <- m[ 3, 1:4] <- m[1:3, 6] <- 0
395    mT <- as(m, "dgTMatrix")
396    stopifnot(identical(mT[lower.tri(mT)],
397                        m [lower.tri(m) ]))
398    lM <- upper.tri(mT, diag=TRUE)
399    mT[lM] <- 0
400     m[lM] <- 0
401    assert.EQ.mat(mT, as(m,"matrix"))
402    mT[lM] <- -1:0
403     m[lM] <- -1:0
404    assert.EQ.mat(mT, as(m,"matrix"))
405    (mT <- drop0(mT))
406    
407  i <- c(1:2, 4, 6:7); j <- c(2:4,6)  i <- c(1:2, 4, 6:7); j <- c(2:4,6)
408  H[i,j] <- 0  H[i,j] <- 0
# Line 190  Line 412 
412  stopifnot(as.matrix(Hc.[i,j]) == 0)  stopifnot(as.matrix(Hc.[i,j]) == 0)
413  Hc.[, 1:6]  Hc.[, 1:6]
414    
415    ## an example that failed for a long time
416    sy3 <- new("dsyMatrix", Dim = as.integer(c(2, 2)), x = c(14, -1, 2, -7))
417    validObject(dm <- kronecker(Diagonal(2), sy3))# now sparse with new kronecker
418    dm <- Matrix(as.matrix(dm))# -> "dsyMatrix"
419    (s2 <- as(dm, "sparseMatrix"))
420    validObject(st <- as(s2, "TsparseMatrix"))
421    stopifnot(is(s2, "symmetricMatrix"),
422              is(st, "symmetricMatrix"))
423    validObject(s.32  <- st[1:3,1:2]) ## 3 x 2 - and *not* dsTMatrix
424    validObject(s2.32 <- s2[1:3,1:2])
425    I <- c(1,4:3)
426    stopifnot(is(s2.32, "generalMatrix"),
427              is(s.32,  "generalMatrix"),
428              identical(as.mat(s.32), as.mat(s2.32)),
429              identical3(dm[1:3,-1], asD(s2[1:3,-1]), asD(st[1:3,-1])),
430              identical4(2, dm[4,3], s2[4,3], st[4,3]),
431              identical3(diag(dm), diag(s2), diag(st)),
432              is((cI <- s2[I,I]), "dsCMatrix"),
433              is((tI <- st[I,I]), "dsTMatrix"),
434              identical4(as.mat(dm)[I,I], as.mat(dm[I,I]), as.mat(tI), as.mat(cI))
435              )
436    
437    ## now sub-assign  and check for consistency
438    ## symmetric subassign should keep symmetry
439    st[I,I] <- 0; validObject(st); stopifnot(is(st,"symmetricMatrix"))
440    s2[I,I] <- 0; validObject(s2); stopifnot(is(s2,"symmetricMatrix"))
441    ##
442    m <- as.mat(st)
443     m[2:1,2:1] <- 4:1
444    st[2:1,2:1] <- 4:1
445    s2[2:1,2:1] <- 4:1
446    stopifnot(identical(m, as.mat(st)),
447              1:4 == as.vector(s2[1:2,1:2]),
448              identical(m, as.mat(s2)))
449    
450    ## now a slightly different situation for 's2' (had bug)
451    s2 <- as(dm, "sparseMatrix")
452    s2[I,I] <- 0; diag(s2)[2:3] <- -(1:2)
453    stopifnot(is(s2,"symmetricMatrix"), diag(s2) == c(0:-2,0))
454    t2 <- as(s2, "TsparseMatrix")
455    m <- as.mat(s2)
456    s2[2:1,2:1] <- 4:1
457    t2[2:1,2:1] <- 4:1
458     m[2:1,2:1] <- 4:1
459    assert.EQ.mat(t2, m)
460    assert.EQ.mat(s2, m)
461    ## and the same (for a different s2 !)
462    s2[2:1,2:1] <- 4:1
463    t2[2:1,2:1] <- 4:1
464    assert.EQ.mat(t2, m)# ok
465    assert.EQ.mat(s2, m)# failed in 0.9975-8
466    
467    
468    ## m[cbind(i,j)] <- value:
469    m.[ cbind(3:5, 1:3) ] <- 1:3
470    stopifnot(m.[3,1] == 1, m.[4,2] == 2)
471    x.x[ cbind(2:6, 2:6)] <- 12:16
472    validObject(x.x)
473    stopifnot(class(x.x) == "dsCMatrix",
474              12:16 == as.mat(x.x)[cbind(2:6, 2:6)])
475    (ne1 <- (mc - m.) != 0)
476    stopifnot(identical(ne1, 0 != abs(mc - m.)))
477    (ge <- m. >= mc) # contains "=" -> result is dense
478    ne. <- mc != m.  # was wrong (+ warning)
479    stopifnot(identical(!(m. < mc), m. >= mc),
480              identical(m. < mc, as(!ge, "sparseMatrix")),
481              identical(ne., Matrix:::drop0(ne1)))
482    
483    (M3 <- Matrix(upper.tri(matrix(, 3, 3)))) # ltC; indexing used to fail
484    T3 <- as(M3, "TsparseMatrix")
485    stopifnot(identical(drop(M3), M3),
486              identical4(drop(M3[,2, drop = FALSE]), M3[,2, drop = TRUE],
487                         drop(T3[,2, drop = FALSE]), T3[,2, drop = TRUE]),
488              is(T3, "triangularMatrix"),
489              !is(T3[,2, drop=FALSE], "triangularMatrix")
490              )
491    
492  cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''  cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''

Legend:
Removed from v.1374  
changed lines
  Added in v.2110

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