Back to Build/check report for BioC 3.17: simplified long |
|
This page was generated on 2023-03-27 05:50:30 -0000 (Mon, 27 Mar 2023).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
kunpeng1 | Linux (Ubuntu 22.04.1 LTS) | aarch64 | R Under development (unstable) (2023-03-12 r83975) -- "Unsuffered Consequences" | 6083 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
To the developers/maintainers of the BufferedMatrix package: - Please allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See How and When does the builder pull? When will my changes propagate? for more information. - Make sure to use the following settings in order to reproduce any error or warning you see on this page. |
Package 242/2195 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.63.0 (landing page) Ben Bolstad
| kunpeng1 | Linux (Ubuntu 22.04.1 LTS) / aarch64 | OK | OK | OK | |||||||||
Package: BufferedMatrix |
Version: 1.63.0 |
Command: /home/biocbuild/bbs-3.17-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.17-bioc/R/site-library --timings BufferedMatrix_1.63.0.tar.gz |
StartedAt: 2023-03-24 22:24:50 -0000 (Fri, 24 Mar 2023) |
EndedAt: 2023-03-24 22:25:27 -0000 (Fri, 24 Mar 2023) |
EllapsedTime: 36.2 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.17-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.17-bioc/R/site-library --timings BufferedMatrix_1.63.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2023-03-12 r83975) * using platform: aarch64-unknown-linux-gnu (64-bit) * R was compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 * running under: Ubuntu 22.04.2 LTS * using session charset: UTF-8 * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.63.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... ‘BufferedMatrix.Rnw’... OK OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.17-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0’ gcc -I"/home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/lib/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/lib/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/lib/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/lib/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -c init_package.c -o init_package.o gcc -shared -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o installing to /home/biocbuild/bbs-3.17-bioc/R-devel_2023-03-12_r83975-bin/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R Under development (unstable) (2023-03-12 r83975) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.334 0.042 0.360
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2023-03-12 r83975) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 457425 24.5 981530 52.5 650797 34.8 Vcells 843115 6.5 8388608 64.0 2039302 15.6 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Mar 24 22:25:05 2023" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 24 22:25:06 2023" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0xaaaabc9b5640> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Mar 24 22:25:06 2023" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 24 22:25:06 2023" > > ColMode(tmp2) <pointer: 0xaaaabc9b5640> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2143876 -1.4378092 0.21697177 0.5235858 [2,] 0.5960283 -1.9027119 -0.05774066 1.4787268 [3,] 0.3915398 1.5183668 1.08041576 0.8382840 [4,] -0.1052136 -0.1750961 0.45726007 0.5879312 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2143876 1.4378092 0.21697177 0.5235858 [2,] 0.5960283 1.9027119 0.05774066 1.4787268 [3,] 0.3915398 1.5183668 1.08041576 0.8382840 [4,] 0.1052136 0.1750961 0.45726007 0.5879312 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9606419 1.1990868 0.4658023 0.7235923 [2,] 0.7720287 1.3793882 0.2402929 1.2160291 [3,] 0.6257314 1.2322203 1.0394305 0.9155785 [4,] 0.3243664 0.4184448 0.6762101 0.7667667 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.82081 38.42868 29.87499 32.75951 [2,] 33.31632 40.69659 27.46067 38.63902 [3,] 31.64885 38.84057 36.47472 34.99407 [4,] 28.34888 29.35954 32.21936 33.25560 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0xaaaabe6aa7a0> > exp(tmp5) <pointer: 0xaaaabe6aa7a0> > log(tmp5,2) <pointer: 0xaaaabe6aa7a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.8537 > Min(tmp5) [1] 53.80939 > mean(tmp5) [1] 71.82538 > Sum(tmp5) [1] 14365.08 > Var(tmp5) [1] 858.7511 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.26261 69.65283 70.55572 70.91657 69.17947 70.84584 68.91910 71.29269 [9] 69.58210 70.04687 > rowSums(tmp5) [1] 1745.252 1393.057 1411.114 1418.331 1383.589 1416.917 1378.382 1425.854 [9] 1391.642 1400.937 > rowVars(tmp5) [1] 7991.61901 90.32939 52.69401 111.40676 79.86620 86.82170 [7] 49.36718 90.69776 96.97187 59.93325 > rowSd(tmp5) [1] 89.395856 9.504177 7.259064 10.554940 8.936789 9.317816 7.026178 [8] 9.523537 9.847429 7.741657 > rowMax(tmp5) [1] 465.85368 84.70463 90.24827 96.78152 87.27815 87.39944 81.04994 [8] 96.90043 102.08922 92.62181 > rowMin(tmp5) [1] 55.96451 56.34171 58.13651 56.88421 54.63618 54.65734 56.55676 53.80939 [9] 55.64780 57.74373 > > colMeans(tmp5) [1] 107.21353 73.63639 67.18554 72.05997 68.75364 71.03478 66.74373 [8] 67.41909 69.33245 67.96907 67.86014 71.13600 72.84884 73.99724 [15] 69.69736 73.75837 67.81682 71.82745 70.19552 66.02167 > colSums(tmp5) [1] 1072.1353 736.3639 671.8554 720.5997 687.5364 710.3478 667.4373 [8] 674.1909 693.3245 679.6907 678.6014 711.3600 728.4884 739.9724 [15] 696.9736 737.5837 678.1682 718.2745 701.9552 660.2167 > colVars(tmp5) [1] 15905.95498 89.26418 50.05617 162.60602 75.39153 27.29514 [7] 73.78003 59.43922 64.73957 78.81736 67.81629 110.97494 [13] 39.48572 82.74899 51.79174 226.46164 26.00704 71.47038 [19] 85.05617 43.00195 > colSd(tmp5) [1] 126.118813 9.447972 7.075038 12.751707 8.682830 5.224476 [7] 8.589530 7.709684 8.046091 8.877914 8.235065 10.534465 [13] 6.283766 9.096647 7.196648 15.048642 5.099710 8.454015 [19] 9.222590 6.557588 > colMax(tmp5) [1] 465.85368 84.70463 79.45096 102.08922 81.69605 79.11618 79.71606 [8] 76.70715 82.93395 87.27815 79.43907 90.24827 82.10280 92.62181 [15] 82.36134 96.90043 75.53165 80.81713 85.91046 78.42339 > colMin(tmp5) [1] 59.00447 54.63618 57.15579 56.47557 53.80939 63.00165 54.65734 56.55676 [9] 57.74373 57.90343 56.34171 58.54918 62.76300 65.59191 56.93371 56.68149 [17] 58.67676 55.64780 55.96451 57.00488 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] NA 69.65283 70.55572 70.91657 69.17947 70.84584 68.91910 71.29269 [9] 69.58210 70.04687 > rowSums(tmp5) [1] NA 1393.057 1411.114 1418.331 1383.589 1416.917 1378.382 1425.854 [9] 1391.642 1400.937 > rowVars(tmp5) [1] 8421.76888 90.32939 52.69401 111.40676 79.86620 86.82170 [7] 49.36718 90.69776 96.97187 59.93325 > rowSd(tmp5) [1] 91.770196 9.504177 7.259064 10.554940 8.936789 9.317816 7.026178 [8] 9.523537 9.847429 7.741657 > rowMax(tmp5) [1] NA 84.70463 90.24827 96.78152 87.27815 87.39944 81.04994 [8] 96.90043 102.08922 92.62181 > rowMin(tmp5) [1] NA 56.34171 58.13651 56.88421 54.63618 54.65734 56.55676 53.80939 [9] 55.64780 57.74373 > > colMeans(tmp5) [1] 107.21353 73.63639 67.18554 72.05997 68.75364 71.03478 66.74373 [8] 67.41909 69.33245 67.96907 67.86014 71.13600 72.84884 NA [15] 69.69736 73.75837 67.81682 71.82745 70.19552 66.02167 > colSums(tmp5) [1] 1072.1353 736.3639 671.8554 720.5997 687.5364 710.3478 667.4373 [8] 674.1909 693.3245 679.6907 678.6014 711.3600 728.4884 NA [15] 696.9736 737.5837 678.1682 718.2745 701.9552 660.2167 > colVars(tmp5) [1] 15905.95498 89.26418 50.05617 162.60602 75.39153 27.29514 [7] 73.78003 59.43922 64.73957 78.81736 67.81629 110.97494 [13] 39.48572 NA 51.79174 226.46164 26.00704 71.47038 [19] 85.05617 43.00195 > colSd(tmp5) [1] 126.118813 9.447972 7.075038 12.751707 8.682830 5.224476 [7] 8.589530 7.709684 8.046091 8.877914 8.235065 10.534465 [13] 6.283766 NA 7.196648 15.048642 5.099710 8.454015 [19] 9.222590 6.557588 > colMax(tmp5) [1] 465.85368 84.70463 79.45096 102.08922 81.69605 79.11618 79.71606 [8] 76.70715 82.93395 87.27815 79.43907 90.24827 82.10280 NA [15] 82.36134 96.90043 75.53165 80.81713 85.91046 78.42339 > colMin(tmp5) [1] 59.00447 54.63618 57.15579 56.47557 53.80939 63.00165 54.65734 56.55676 [9] 57.74373 57.90343 56.34171 58.54918 62.76300 NA 56.93371 56.68149 [17] 58.67676 55.64780 55.96451 57.00488 > > Max(tmp5,na.rm=TRUE) [1] 465.8537 > Min(tmp5,na.rm=TRUE) [1] 53.80939 > mean(tmp5,na.rm=TRUE) [1] 71.82508 > Sum(tmp5,na.rm=TRUE) [1] 14293.19 > Var(tmp5,na.rm=TRUE) [1] 863.0883 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.07197 69.65283 70.55572 70.91657 69.17947 70.84584 68.91910 71.29269 [9] 69.58210 70.04687 > rowSums(tmp5,na.rm=TRUE) [1] 1673.367 1393.057 1411.114 1418.331 1383.589 1416.917 1378.382 1425.854 [9] 1391.642 1400.937 > rowVars(tmp5,na.rm=TRUE) [1] 8421.76888 90.32939 52.69401 111.40676 79.86620 86.82170 [7] 49.36718 90.69776 96.97187 59.93325 > rowSd(tmp5,na.rm=TRUE) [1] 91.770196 9.504177 7.259064 10.554940 8.936789 9.317816 7.026178 [8] 9.523537 9.847429 7.741657 > rowMax(tmp5,na.rm=TRUE) [1] 465.85368 84.70463 90.24827 96.78152 87.27815 87.39944 81.04994 [8] 96.90043 102.08922 92.62181 > rowMin(tmp5,na.rm=TRUE) [1] 55.96451 56.34171 58.13651 56.88421 54.63618 54.65734 56.55676 53.80939 [9] 55.64780 57.74373 > > colMeans(tmp5,na.rm=TRUE) [1] 107.21353 73.63639 67.18554 72.05997 68.75364 71.03478 66.74373 [8] 67.41909 69.33245 67.96907 67.86014 71.13600 72.84884 74.23195 [15] 69.69736 73.75837 67.81682 71.82745 70.19552 66.02167 > colSums(tmp5,na.rm=TRUE) [1] 1072.1353 736.3639 671.8554 720.5997 687.5364 710.3478 667.4373 [8] 674.1909 693.3245 679.6907 678.6014 711.3600 728.4884 668.0876 [15] 696.9736 737.5837 678.1682 718.2745 701.9552 660.2167 > colVars(tmp5,na.rm=TRUE) [1] 15905.95498 89.26418 50.05617 162.60602 75.39153 27.29514 [7] 73.78003 59.43922 64.73957 78.81736 67.81629 110.97494 [13] 39.48572 92.47287 51.79174 226.46164 26.00704 71.47038 [19] 85.05617 43.00195 > colSd(tmp5,na.rm=TRUE) [1] 126.118813 9.447972 7.075038 12.751707 8.682830 5.224476 [7] 8.589530 7.709684 8.046091 8.877914 8.235065 10.534465 [13] 6.283766 9.616282 7.196648 15.048642 5.099710 8.454015 [19] 9.222590 6.557588 > colMax(tmp5,na.rm=TRUE) [1] 465.85368 84.70463 79.45096 102.08922 81.69605 79.11618 79.71606 [8] 76.70715 82.93395 87.27815 79.43907 90.24827 82.10280 92.62181 [15] 82.36134 96.90043 75.53165 80.81713 85.91046 78.42339 > colMin(tmp5,na.rm=TRUE) [1] 59.00447 54.63618 57.15579 56.47557 53.80939 63.00165 54.65734 56.55676 [9] 57.74373 57.90343 56.34171 58.54918 62.76300 65.59191 56.93371 56.68149 [17] 58.67676 55.64780 55.96451 57.00488 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 69.65283 70.55572 70.91657 69.17947 70.84584 68.91910 71.29269 [9] 69.58210 70.04687 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1393.057 1411.114 1418.331 1383.589 1416.917 1378.382 1425.854 [9] 1391.642 1400.937 > rowVars(tmp5,na.rm=TRUE) [1] NA 90.32939 52.69401 111.40676 79.86620 86.82170 49.36718 [8] 90.69776 96.97187 59.93325 > rowSd(tmp5,na.rm=TRUE) [1] NA 9.504177 7.259064 10.554940 8.936789 9.317816 7.026178 [8] 9.523537 9.847429 7.741657 > rowMax(tmp5,na.rm=TRUE) [1] NA 84.70463 90.24827 96.78152 87.27815 87.39944 81.04994 [8] 96.90043 102.08922 92.62181 > rowMin(tmp5,na.rm=TRUE) [1] NA 56.34171 58.13651 56.88421 54.63618 54.65734 56.55676 53.80939 [9] 55.64780 57.74373 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 67.36462 72.93107 67.74161 72.49056 68.80373 70.26274 66.78540 66.98771 [9] 70.59338 68.24369 68.84940 71.58136 73.13698 NaN 71.11554 73.89774 [17] 67.83295 70.96780 71.77674 66.60765 > colSums(tmp5,na.rm=TRUE) [1] 606.2816 656.3797 609.6745 652.4151 619.2335 632.3647 601.0686 602.8894 [9] 635.3404 614.1932 619.6446 644.2322 658.2328 0.0000 640.0399 665.0797 [17] 610.4965 638.7102 645.9907 599.4688 > colVars(tmp5,na.rm=TRUE) [1] 29.92663 94.82562 52.83451 180.84590 84.78726 24.00157 82.98300 [8] 64.77557 54.94520 87.82107 65.28362 122.61543 43.48742 NA [15] 35.63921 254.55081 29.25500 72.09041 67.56018 44.51425 > colSd(tmp5,na.rm=TRUE) [1] 5.470524 9.737845 7.268735 13.447896 9.208000 4.899140 9.109501 [8] 8.048327 7.412503 9.371289 8.079828 11.073185 6.594499 NA [15] 5.969859 15.954649 5.408789 8.490607 8.219500 6.671900 > colMax(tmp5,na.rm=TRUE) [1] 75.95957 84.70463 79.45096 102.08922 81.69605 79.11618 79.71606 [8] 76.70715 82.93395 87.27815 79.43907 90.24827 82.10280 -Inf [15] 82.36134 96.90043 75.53165 80.81713 85.91046 78.42339 > colMin(tmp5,na.rm=TRUE) [1] 59.00447 54.63618 57.15579 56.47557 53.80939 63.00165 54.65734 56.55676 [9] 57.74373 57.90343 56.34171 58.54918 62.76300 Inf 62.00364 56.68149 [17] 58.67676 55.64780 58.79754 57.00488 > > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 3 > which.col <- 1 > cat(which.row," ",which.col,"\n") 3 1 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > rowVars(tmp5,na.rm=TRUE) [1] 172.8965 201.4022 227.4247 206.7453 356.1011 336.6863 197.4310 233.0004 [9] 145.4197 175.8932 > apply(copymatrix,1,var,na.rm=TRUE) [1] 172.8965 201.4022 227.4247 206.7453 356.1011 336.6863 197.4310 233.0004 [9] 145.4197 175.8932 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.136868e-13 5.684342e-14 0.000000e+00 1.989520e-13 -8.526513e-14 [6] -5.684342e-14 -2.273737e-13 -2.842171e-14 -2.842171e-14 -5.684342e-14 [11] -1.136868e-13 -2.273737e-13 -5.684342e-14 -2.842171e-14 1.136868e-13 [16] -1.136868e-13 8.526513e-14 -2.842171e-14 -1.136868e-13 -2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 6 7 4 3 5 1 5 4 15 8 14 4 20 1 10 10 17 6 4 6 3 7 10 7 10 3 1 5 4 4 14 8 19 9 15 10 3 8 3 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.323357 > Min(tmp) [1] -2.196807 > mean(tmp) [1] -0.01202573 > Sum(tmp) [1] -1.202573 > Var(tmp) [1] 0.8990106 > > rowMeans(tmp) [1] -0.01202573 > rowSums(tmp) [1] -1.202573 > rowVars(tmp) [1] 0.8990106 > rowSd(tmp) [1] 0.9481617 > rowMax(tmp) [1] 2.323357 > rowMin(tmp) [1] -2.196807 > > colMeans(tmp) [1] 0.610572062 -0.826961394 -0.495822107 0.160905631 -1.991433470 [6] 1.653640358 -0.305427563 0.392974957 0.715659671 -0.492586535 [11] -1.125589804 -0.960430761 -0.243230888 -0.360177957 -0.807517268 [16] -0.297777954 -1.132850873 -0.119036647 -2.034406989 1.701969022 [21] -1.151787612 -0.504038835 1.237026632 0.557912281 1.064726325 [26] -1.042595681 0.575498701 1.301895248 0.557503784 1.345088608 [31] -0.120069118 -0.791710232 0.371726511 0.104950230 0.055408115 [36] 0.450318661 -0.412458158 -0.269035751 -0.681751055 -2.196806562 [41] -0.439556132 -0.877906059 -0.408012582 -1.465991963 0.335568408 [46] -0.709177020 0.116111222 -0.393233801 -0.229939882 0.727792366 [51] -1.039443747 -1.132416462 -0.886549295 -0.867718203 0.244171044 [56] -0.709967247 -1.016156504 -0.231771844 0.861672620 0.790278688 [61] -0.952181412 -0.432876787 -1.167244832 0.375650370 0.199879210 [66] 1.359134406 0.085753552 0.699903001 -0.017030600 0.004731303 [71] 1.051688146 0.254129905 0.630303651 -0.106250950 2.323356853 [76] 1.010326127 1.237818926 -0.925486855 0.266563560 -0.901786560 [81] 0.660944548 0.050206426 0.674562408 -1.107038349 -0.709965261 [86] 1.143705282 0.421691564 0.270782712 -1.352414199 -0.098347898 [91] -0.602883596 2.129429239 1.428324833 1.470042340 -0.600818383 [96] 2.133228980 1.924802848 -0.123688638 -0.721040051 -0.352506035 > colSums(tmp) [1] 0.610572062 -0.826961394 -0.495822107 0.160905631 -1.991433470 [6] 1.653640358 -0.305427563 0.392974957 0.715659671 -0.492586535 [11] -1.125589804 -0.960430761 -0.243230888 -0.360177957 -0.807517268 [16] -0.297777954 -1.132850873 -0.119036647 -2.034406989 1.701969022 [21] -1.151787612 -0.504038835 1.237026632 0.557912281 1.064726325 [26] -1.042595681 0.575498701 1.301895248 0.557503784 1.345088608 [31] -0.120069118 -0.791710232 0.371726511 0.104950230 0.055408115 [36] 0.450318661 -0.412458158 -0.269035751 -0.681751055 -2.196806562 [41] -0.439556132 -0.877906059 -0.408012582 -1.465991963 0.335568408 [46] -0.709177020 0.116111222 -0.393233801 -0.229939882 0.727792366 [51] -1.039443747 -1.132416462 -0.886549295 -0.867718203 0.244171044 [56] -0.709967247 -1.016156504 -0.231771844 0.861672620 0.790278688 [61] -0.952181412 -0.432876787 -1.167244832 0.375650370 0.199879210 [66] 1.359134406 0.085753552 0.699903001 -0.017030600 0.004731303 [71] 1.051688146 0.254129905 0.630303651 -0.106250950 2.323356853 [76] 1.010326127 1.237818926 -0.925486855 0.266563560 -0.901786560 [81] 0.660944548 0.050206426 0.674562408 -1.107038349 -0.709965261 [86] 1.143705282 0.421691564 0.270782712 -1.352414199 -0.098347898 [91] -0.602883596 2.129429239 1.428324833 1.470042340 -0.600818383 [96] 2.133228980 1.924802848 -0.123688638 -0.721040051 -0.352506035 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 0.610572062 -0.826961394 -0.495822107 0.160905631 -1.991433470 [6] 1.653640358 -0.305427563 0.392974957 0.715659671 -0.492586535 [11] -1.125589804 -0.960430761 -0.243230888 -0.360177957 -0.807517268 [16] -0.297777954 -1.132850873 -0.119036647 -2.034406989 1.701969022 [21] -1.151787612 -0.504038835 1.237026632 0.557912281 1.064726325 [26] -1.042595681 0.575498701 1.301895248 0.557503784 1.345088608 [31] -0.120069118 -0.791710232 0.371726511 0.104950230 0.055408115 [36] 0.450318661 -0.412458158 -0.269035751 -0.681751055 -2.196806562 [41] -0.439556132 -0.877906059 -0.408012582 -1.465991963 0.335568408 [46] -0.709177020 0.116111222 -0.393233801 -0.229939882 0.727792366 [51] -1.039443747 -1.132416462 -0.886549295 -0.867718203 0.244171044 [56] -0.709967247 -1.016156504 -0.231771844 0.861672620 0.790278688 [61] -0.952181412 -0.432876787 -1.167244832 0.375650370 0.199879210 [66] 1.359134406 0.085753552 0.699903001 -0.017030600 0.004731303 [71] 1.051688146 0.254129905 0.630303651 -0.106250950 2.323356853 [76] 1.010326127 1.237818926 -0.925486855 0.266563560 -0.901786560 [81] 0.660944548 0.050206426 0.674562408 -1.107038349 -0.709965261 [86] 1.143705282 0.421691564 0.270782712 -1.352414199 -0.098347898 [91] -0.602883596 2.129429239 1.428324833 1.470042340 -0.600818383 [96] 2.133228980 1.924802848 -0.123688638 -0.721040051 -0.352506035 > colMin(tmp) [1] 0.610572062 -0.826961394 -0.495822107 0.160905631 -1.991433470 [6] 1.653640358 -0.305427563 0.392974957 0.715659671 -0.492586535 [11] -1.125589804 -0.960430761 -0.243230888 -0.360177957 -0.807517268 [16] -0.297777954 -1.132850873 -0.119036647 -2.034406989 1.701969022 [21] -1.151787612 -0.504038835 1.237026632 0.557912281 1.064726325 [26] -1.042595681 0.575498701 1.301895248 0.557503784 1.345088608 [31] -0.120069118 -0.791710232 0.371726511 0.104950230 0.055408115 [36] 0.450318661 -0.412458158 -0.269035751 -0.681751055 -2.196806562 [41] -0.439556132 -0.877906059 -0.408012582 -1.465991963 0.335568408 [46] -0.709177020 0.116111222 -0.393233801 -0.229939882 0.727792366 [51] -1.039443747 -1.132416462 -0.886549295 -0.867718203 0.244171044 [56] -0.709967247 -1.016156504 -0.231771844 0.861672620 0.790278688 [61] -0.952181412 -0.432876787 -1.167244832 0.375650370 0.199879210 [66] 1.359134406 0.085753552 0.699903001 -0.017030600 0.004731303 [71] 1.051688146 0.254129905 0.630303651 -0.106250950 2.323356853 [76] 1.010326127 1.237818926 -0.925486855 0.266563560 -0.901786560 [81] 0.660944548 0.050206426 0.674562408 -1.107038349 -0.709965261 [86] 1.143705282 0.421691564 0.270782712 -1.352414199 -0.098347898 [91] -0.602883596 2.129429239 1.428324833 1.470042340 -0.600818383 [96] 2.133228980 1.924802848 -0.123688638 -0.721040051 -0.352506035 > colMedians(tmp) [1] 0.610572062 -0.826961394 -0.495822107 0.160905631 -1.991433470 [6] 1.653640358 -0.305427563 0.392974957 0.715659671 -0.492586535 [11] -1.125589804 -0.960430761 -0.243230888 -0.360177957 -0.807517268 [16] -0.297777954 -1.132850873 -0.119036647 -2.034406989 1.701969022 [21] -1.151787612 -0.504038835 1.237026632 0.557912281 1.064726325 [26] -1.042595681 0.575498701 1.301895248 0.557503784 1.345088608 [31] -0.120069118 -0.791710232 0.371726511 0.104950230 0.055408115 [36] 0.450318661 -0.412458158 -0.269035751 -0.681751055 -2.196806562 [41] -0.439556132 -0.877906059 -0.408012582 -1.465991963 0.335568408 [46] -0.709177020 0.116111222 -0.393233801 -0.229939882 0.727792366 [51] -1.039443747 -1.132416462 -0.886549295 -0.867718203 0.244171044 [56] -0.709967247 -1.016156504 -0.231771844 0.861672620 0.790278688 [61] -0.952181412 -0.432876787 -1.167244832 0.375650370 0.199879210 [66] 1.359134406 0.085753552 0.699903001 -0.017030600 0.004731303 [71] 1.051688146 0.254129905 0.630303651 -0.106250950 2.323356853 [76] 1.010326127 1.237818926 -0.925486855 0.266563560 -0.901786560 [81] 0.660944548 0.050206426 0.674562408 -1.107038349 -0.709965261 [86] 1.143705282 0.421691564 0.270782712 -1.352414199 -0.098347898 [91] -0.602883596 2.129429239 1.428324833 1.470042340 -0.600818383 [96] 2.133228980 1.924802848 -0.123688638 -0.721040051 -0.352506035 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.6105721 -0.8269614 -0.4958221 0.1609056 -1.991433 1.65364 -0.3054276 [2,] 0.6105721 -0.8269614 -0.4958221 0.1609056 -1.991433 1.65364 -0.3054276 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.392975 0.7156597 -0.4925865 -1.12559 -0.9604308 -0.2432309 -0.360178 [2,] 0.392975 0.7156597 -0.4925865 -1.12559 -0.9604308 -0.2432309 -0.360178 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.8075173 -0.297778 -1.132851 -0.1190366 -2.034407 1.701969 -1.151788 [2,] -0.8075173 -0.297778 -1.132851 -0.1190366 -2.034407 1.701969 -1.151788 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.5040388 1.237027 0.5579123 1.064726 -1.042596 0.5754987 1.301895 [2,] -0.5040388 1.237027 0.5579123 1.064726 -1.042596 0.5754987 1.301895 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.5575038 1.345089 -0.1200691 -0.7917102 0.3717265 0.1049502 0.05540811 [2,] 0.5575038 1.345089 -0.1200691 -0.7917102 0.3717265 0.1049502 0.05540811 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.4503187 -0.4124582 -0.2690358 -0.6817511 -2.196807 -0.4395561 -0.8779061 [2,] 0.4503187 -0.4124582 -0.2690358 -0.6817511 -2.196807 -0.4395561 -0.8779061 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.4080126 -1.465992 0.3355684 -0.709177 0.1161112 -0.3932338 -0.2299399 [2,] -0.4080126 -1.465992 0.3355684 -0.709177 0.1161112 -0.3932338 -0.2299399 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.7277924 -1.039444 -1.132416 -0.8865493 -0.8677182 0.244171 -0.7099672 [2,] 0.7277924 -1.039444 -1.132416 -0.8865493 -0.8677182 0.244171 -0.7099672 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.016157 -0.2317718 0.8616726 0.7902787 -0.9521814 -0.4328768 -1.167245 [2,] -1.016157 -0.2317718 0.8616726 0.7902787 -0.9521814 -0.4328768 -1.167245 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.3756504 0.1998792 1.359134 0.08575355 0.699903 -0.0170306 0.004731303 [2,] 0.3756504 0.1998792 1.359134 0.08575355 0.699903 -0.0170306 0.004731303 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.051688 0.2541299 0.6303037 -0.1062509 2.323357 1.010326 1.237819 [2,] 1.051688 0.2541299 0.6303037 -0.1062509 2.323357 1.010326 1.237819 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.9254869 0.2665636 -0.9017866 0.6609445 0.05020643 0.6745624 -1.107038 [2,] -0.9254869 0.2665636 -0.9017866 0.6609445 0.05020643 0.6745624 -1.107038 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.7099653 1.143705 0.4216916 0.2707827 -1.352414 -0.0983479 -0.6028836 [2,] -0.7099653 1.143705 0.4216916 0.2707827 -1.352414 -0.0983479 -0.6028836 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 2.129429 1.428325 1.470042 -0.6008184 2.133229 1.924803 -0.1236886 [2,] 2.129429 1.428325 1.470042 -0.6008184 2.133229 1.924803 -0.1236886 [,99] [,100] [1,] -0.7210401 -0.352506 [2,] -0.7210401 -0.352506 > > > Max(tmp2) [1] 2.610709 > Min(tmp2) [1] -3.851062 > mean(tmp2) [1] -0.2530633 > Sum(tmp2) [1] -25.30633 > Var(tmp2) [1] 1.058035 > > rowMeans(tmp2) [1] 5.350646e-01 5.571876e-02 -9.312627e-01 -1.685415e-02 1.275265e-01 [6] 1.137674e+00 -2.047240e+00 -7.301088e-01 1.554059e+00 -1.227625e+00 [11] -1.537778e-01 1.477135e-01 6.660164e-01 -2.785550e+00 -7.247265e-01 [16] 1.091597e-01 -4.199001e-01 -8.134873e-01 -2.236367e-01 -2.653877e+00 [21] -7.450525e-01 -1.087826e+00 -1.282702e+00 -1.109463e+00 8.135667e-01 [26] -2.856211e-05 -1.076248e+00 5.873253e-01 -1.070592e-01 -1.742554e+00 [31] 1.012683e+00 -2.622811e-01 -7.178736e-01 1.772027e-01 -1.037360e+00 [36] 3.842906e-01 -2.658091e-01 3.322740e-01 -2.567485e-01 2.610709e+00 [41] 7.562751e-01 -7.974905e-02 3.251064e-02 -1.965191e-01 1.036439e+00 [46] -1.269912e+00 2.810734e-01 -2.288534e-01 -1.068525e-01 8.570679e-01 [51] -1.009016e+00 4.561215e-01 -9.345395e-01 -1.093361e+00 -5.959317e-01 [56] -1.688232e+00 2.731391e-01 1.217336e+00 1.324449e-01 -7.274382e-01 [61] 2.212109e+00 -6.628615e-01 1.056971e-01 -1.153558e+00 -2.602371e-01 [66] 6.467405e-01 2.649474e-01 5.584047e-02 -4.551722e-01 3.972945e-02 [71] 1.086086e+00 -9.814640e-01 -3.425364e-01 -9.347023e-01 -1.728369e+00 [76] -8.900456e-01 -6.908803e-01 -3.851062e+00 -3.259893e-01 -9.736796e-01 [81] -1.246939e+00 1.905052e-01 7.273662e-01 9.299744e-01 1.020355e+00 [86] -8.181592e-01 -2.044775e-01 -1.382369e+00 1.814502e+00 4.616457e-01 [91] -1.473095e+00 -1.211673e+00 1.106495e+00 5.734643e-01 -1.361458e+00 [96] 1.170825e+00 1.164130e-01 -5.974087e-01 -1.041753e+00 -1.850709e-01 > rowSums(tmp2) [1] 5.350646e-01 5.571876e-02 -9.312627e-01 -1.685415e-02 1.275265e-01 [6] 1.137674e+00 -2.047240e+00 -7.301088e-01 1.554059e+00 -1.227625e+00 [11] -1.537778e-01 1.477135e-01 6.660164e-01 -2.785550e+00 -7.247265e-01 [16] 1.091597e-01 -4.199001e-01 -8.134873e-01 -2.236367e-01 -2.653877e+00 [21] -7.450525e-01 -1.087826e+00 -1.282702e+00 -1.109463e+00 8.135667e-01 [26] -2.856211e-05 -1.076248e+00 5.873253e-01 -1.070592e-01 -1.742554e+00 [31] 1.012683e+00 -2.622811e-01 -7.178736e-01 1.772027e-01 -1.037360e+00 [36] 3.842906e-01 -2.658091e-01 3.322740e-01 -2.567485e-01 2.610709e+00 [41] 7.562751e-01 -7.974905e-02 3.251064e-02 -1.965191e-01 1.036439e+00 [46] -1.269912e+00 2.810734e-01 -2.288534e-01 -1.068525e-01 8.570679e-01 [51] -1.009016e+00 4.561215e-01 -9.345395e-01 -1.093361e+00 -5.959317e-01 [56] -1.688232e+00 2.731391e-01 1.217336e+00 1.324449e-01 -7.274382e-01 [61] 2.212109e+00 -6.628615e-01 1.056971e-01 -1.153558e+00 -2.602371e-01 [66] 6.467405e-01 2.649474e-01 5.584047e-02 -4.551722e-01 3.972945e-02 [71] 1.086086e+00 -9.814640e-01 -3.425364e-01 -9.347023e-01 -1.728369e+00 [76] -8.900456e-01 -6.908803e-01 -3.851062e+00 -3.259893e-01 -9.736796e-01 [81] -1.246939e+00 1.905052e-01 7.273662e-01 9.299744e-01 1.020355e+00 [86] -8.181592e-01 -2.044775e-01 -1.382369e+00 1.814502e+00 4.616457e-01 [91] -1.473095e+00 -1.211673e+00 1.106495e+00 5.734643e-01 -1.361458e+00 [96] 1.170825e+00 1.164130e-01 -5.974087e-01 -1.041753e+00 -1.850709e-01 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] 5.350646e-01 5.571876e-02 -9.312627e-01 -1.685415e-02 1.275265e-01 [6] 1.137674e+00 -2.047240e+00 -7.301088e-01 1.554059e+00 -1.227625e+00 [11] -1.537778e-01 1.477135e-01 6.660164e-01 -2.785550e+00 -7.247265e-01 [16] 1.091597e-01 -4.199001e-01 -8.134873e-01 -2.236367e-01 -2.653877e+00 [21] -7.450525e-01 -1.087826e+00 -1.282702e+00 -1.109463e+00 8.135667e-01 [26] -2.856211e-05 -1.076248e+00 5.873253e-01 -1.070592e-01 -1.742554e+00 [31] 1.012683e+00 -2.622811e-01 -7.178736e-01 1.772027e-01 -1.037360e+00 [36] 3.842906e-01 -2.658091e-01 3.322740e-01 -2.567485e-01 2.610709e+00 [41] 7.562751e-01 -7.974905e-02 3.251064e-02 -1.965191e-01 1.036439e+00 [46] -1.269912e+00 2.810734e-01 -2.288534e-01 -1.068525e-01 8.570679e-01 [51] -1.009016e+00 4.561215e-01 -9.345395e-01 -1.093361e+00 -5.959317e-01 [56] -1.688232e+00 2.731391e-01 1.217336e+00 1.324449e-01 -7.274382e-01 [61] 2.212109e+00 -6.628615e-01 1.056971e-01 -1.153558e+00 -2.602371e-01 [66] 6.467405e-01 2.649474e-01 5.584047e-02 -4.551722e-01 3.972945e-02 [71] 1.086086e+00 -9.814640e-01 -3.425364e-01 -9.347023e-01 -1.728369e+00 [76] -8.900456e-01 -6.908803e-01 -3.851062e+00 -3.259893e-01 -9.736796e-01 [81] -1.246939e+00 1.905052e-01 7.273662e-01 9.299744e-01 1.020355e+00 [86] -8.181592e-01 -2.044775e-01 -1.382369e+00 1.814502e+00 4.616457e-01 [91] -1.473095e+00 -1.211673e+00 1.106495e+00 5.734643e-01 -1.361458e+00 [96] 1.170825e+00 1.164130e-01 -5.974087e-01 -1.041753e+00 -1.850709e-01 > rowMin(tmp2) [1] 5.350646e-01 5.571876e-02 -9.312627e-01 -1.685415e-02 1.275265e-01 [6] 1.137674e+00 -2.047240e+00 -7.301088e-01 1.554059e+00 -1.227625e+00 [11] -1.537778e-01 1.477135e-01 6.660164e-01 -2.785550e+00 -7.247265e-01 [16] 1.091597e-01 -4.199001e-01 -8.134873e-01 -2.236367e-01 -2.653877e+00 [21] -7.450525e-01 -1.087826e+00 -1.282702e+00 -1.109463e+00 8.135667e-01 [26] -2.856211e-05 -1.076248e+00 5.873253e-01 -1.070592e-01 -1.742554e+00 [31] 1.012683e+00 -2.622811e-01 -7.178736e-01 1.772027e-01 -1.037360e+00 [36] 3.842906e-01 -2.658091e-01 3.322740e-01 -2.567485e-01 2.610709e+00 [41] 7.562751e-01 -7.974905e-02 3.251064e-02 -1.965191e-01 1.036439e+00 [46] -1.269912e+00 2.810734e-01 -2.288534e-01 -1.068525e-01 8.570679e-01 [51] -1.009016e+00 4.561215e-01 -9.345395e-01 -1.093361e+00 -5.959317e-01 [56] -1.688232e+00 2.731391e-01 1.217336e+00 1.324449e-01 -7.274382e-01 [61] 2.212109e+00 -6.628615e-01 1.056971e-01 -1.153558e+00 -2.602371e-01 [66] 6.467405e-01 2.649474e-01 5.584047e-02 -4.551722e-01 3.972945e-02 [71] 1.086086e+00 -9.814640e-01 -3.425364e-01 -9.347023e-01 -1.728369e+00 [76] -8.900456e-01 -6.908803e-01 -3.851062e+00 -3.259893e-01 -9.736796e-01 [81] -1.246939e+00 1.905052e-01 7.273662e-01 9.299744e-01 1.020355e+00 [86] -8.181592e-01 -2.044775e-01 -1.382369e+00 1.814502e+00 4.616457e-01 [91] -1.473095e+00 -1.211673e+00 1.106495e+00 5.734643e-01 -1.361458e+00 [96] 1.170825e+00 1.164130e-01 -5.974087e-01 -1.041753e+00 -1.850709e-01 > > colMeans(tmp2) [1] -0.2530633 > colSums(tmp2) [1] -25.30633 > colVars(tmp2) [1] 1.058035 > colSd(tmp2) [1] 1.028608 > colMax(tmp2) [1] 2.610709 > colMin(tmp2) [1] -3.851062 > colMedians(tmp2) [1] -0.2140571 > colRanges(tmp2) [,1] [1,] -3.851062 [2,] 2.610709 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 1.5427683 0.4565295 1.6502512 -5.8547889 -2.6421256 0.7430916 [7] -1.8733339 1.1658532 1.7207292 1.3950317 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2248617 [2,] -0.5303969 [3,] 0.1292805 [4,] 1.0016116 [5,] 1.2763629 > > rowApply(tmp,sum) [1] -0.7891507 -3.1095985 3.5871441 1.2170841 7.2415920 -1.7551667 [7] -0.7224931 -2.5402973 -1.6410231 -3.1840845 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 9 7 10 8 9 2 5 5 3 [2,] 10 4 4 4 7 6 6 3 4 10 [3,] 2 6 6 8 9 4 4 8 7 9 [4,] 5 1 1 6 5 2 1 1 10 1 [5,] 1 7 3 3 1 8 9 6 6 4 [6,] 7 2 10 2 6 3 3 9 9 5 [7,] 3 3 5 5 4 1 5 10 8 6 [8,] 9 8 2 9 10 5 8 2 1 7 [9,] 8 10 8 1 3 7 10 4 2 8 [10,] 6 5 9 7 2 10 7 7 3 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.924227481 -0.009118378 -0.694091743 0.153200266 -0.241685649 [6] 2.285696108 4.581777642 2.272140479 0.314951125 1.463765630 [11] 0.766235666 -3.811584850 -3.202403036 1.454474158 1.715484777 [16] 0.694911099 -1.316089725 -5.301634672 -2.334339128 1.626360050 > colApply(tmp,quantile)[,1] [,1] [1,] -1.932527528 [2,] -0.474887015 [3,] -0.005337512 [4,] 1.115804332 [5,] 2.221175204 > > rowApply(tmp,sum) [1] 2.1340021 0.6383016 1.4994280 -5.1626757 2.2332214 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 16 12 20 2 7 [2,] 13 1 7 19 14 [3,] 4 8 12 12 13 [4,] 12 10 17 1 19 [5,] 11 4 2 15 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.115804332 0.3338463 -0.8499097 0.2484485 0.0917759 1.5766136 [2,] -0.005337512 -1.5171311 -0.2935100 -0.2750273 -0.5796067 -0.2884679 [3,] 2.221175204 -0.5673910 0.2098373 1.2289778 -1.2545371 1.1969212 [4,] -1.932527528 1.2372378 -0.2134746 -2.3722515 0.3760568 -1.3834896 [5,] -0.474887015 0.5043197 0.4529653 1.3230527 1.1246254 1.1841188 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.99381605 -0.85959529 1.2746354 -0.2622190 -0.3222831 -0.8224386 [2,] 1.70606629 0.21448163 1.3367447 1.7161156 -0.3646568 -0.6838766 [3,] 1.38850681 1.74237242 -0.3550244 0.4750285 0.5869532 -1.0925239 [4,] 0.02986429 1.19963374 -0.4065987 -0.2711756 1.5778853 -0.6545996 [5,] -0.53647580 -0.02475202 -1.5348059 -0.1939840 -0.7116630 -0.5581461 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.1299951 0.5261878 -0.3756137 -0.17090957 0.5397792 -1.3396625 [2,] -0.3951472 0.7584816 0.6081582 0.01193858 -0.3446949 -1.0648584 [3,] -1.4783281 0.1215374 0.4774863 -1.10004312 -0.6516042 -1.1754732 [4,] -1.1989307 0.6649052 0.7139932 0.25289012 -0.4919546 -0.7363199 [5,] 0.9999980 -0.6166380 0.2914607 1.70103508 -0.3676153 -0.9853206 [,19] [,20] [1,] -0.59127284 1.1569943 [2,] -0.06063902 0.1592683 [3,] -0.31514740 -0.1592959 [4,] -1.05553766 -0.4982822 [5,] -0.31174221 0.9676755 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -2.642468 1.106696 0.05005977 0.02884438 -1.529053 -0.329246 -0.8418203 col8 col9 col10 col11 col12 col13 col14 row1 -1.370336 1.385884 -0.4585716 1.23587 -0.762581 -0.3718006 1.711366 col15 col16 col17 col18 col19 col20 row1 0.4989004 -0.1616661 0.6866106 -0.6562171 -0.3198219 -1.896842 > tmp[,"col10"] col10 row1 -0.4585716 row2 -0.3894474 row3 -0.4340692 row4 0.2995056 row5 0.8768646 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -2.6424680 1.106696 0.05005977 0.02884438 -1.52905327 -0.329246 row5 0.9171472 -1.009764 -1.02999852 -0.53643827 -0.07120985 1.649382 col7 col8 col9 col10 col11 col12 row1 -0.8418203 -1.3703362 1.3858837 -0.4585716 1.235870 -0.7625810 row5 0.6680264 0.2745745 -0.5688711 0.8768646 -1.660471 0.8579938 col13 col14 col15 col16 col17 col18 row1 -0.3718006 1.7113664 0.4989004 -0.16166613 0.6866106 -0.6562171 row5 -0.1392015 0.3426019 0.5826239 0.07836725 -0.7012477 -0.2043825 col19 col20 row1 -0.3198219 -1.8968418 row5 1.3362057 -0.7681463 > tmp[,c("col6","col20")] col6 col20 row1 -0.3292460 -1.8968418 row2 0.3595633 1.0939521 row3 0.3383210 0.8972186 row4 -1.2183342 0.1207008 row5 1.6493818 -0.7681463 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.329246 -1.8968418 row5 1.649382 -0.7681463 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.51404 50.09897 52.02502 50.84952 48.62134 104.1149 48.97947 50.79413 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.92108 49.02482 52.11099 50.28844 50.403 50.23614 48.26117 49.35257 col17 col18 col19 col20 row1 49.8466 47.3697 50.24722 104.4338 > tmp[,"col10"] col10 row1 49.02482 row2 28.78985 row3 29.76034 row4 29.26614 row5 51.79468 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.51404 50.09897 52.02502 50.84952 48.62134 104.1149 48.97947 50.79413 row5 50.92862 48.89297 49.56823 48.84408 51.27624 105.7292 49.20674 49.53804 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.92108 49.02482 52.11099 50.28844 50.40300 50.23614 48.26117 49.35257 row5 49.44254 51.79468 48.48231 48.75397 50.15599 48.68724 50.68837 48.62527 col17 col18 col19 col20 row1 49.8466 47.3697 50.24722 104.4338 row5 50.3667 49.6802 49.65798 105.9212 > tmp[,c("col6","col20")] col6 col20 row1 104.11494 104.43380 row2 74.35786 74.80373 row3 76.43902 73.43986 row4 73.25994 75.72670 row5 105.72920 105.92121 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.1149 104.4338 row5 105.7292 105.9212 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.1149 104.4338 row5 105.7292 105.9212 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.43030540 [2,] -0.02599807 [3,] 0.45171079 [4,] -0.90940836 [5,] -0.93023863 > tmp[,c("col17","col7")] col17 col7 [1,] -0.12253585 0.79988040 [2,] 0.21416117 0.09474629 [3,] -0.01555008 0.56644745 [4,] -0.33219577 -0.29022610 [5,] 1.44251279 0.07032223 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.3924193 0.6831312 [2,] 0.8379215 -0.3054133 [3,] -1.2884850 0.2392364 [4,] 1.4133352 -1.5583914 [5,] 1.1474708 1.8044462 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.3924193 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.3924193 [2,] 0.8379215 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -0.2577497 -0.1856990 0.007519367 1.238252 -0.2892742 -0.6096298 row1 -0.3494681 0.4248341 0.010099585 0.403454 1.6443834 -0.1432716 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.5027976 0.4234417 -0.3436413 0.9821718 -0.1488702 0.9441666 row1 -2.3048820 -0.5573135 1.4368324 -1.0501264 0.9139966 0.4862141 [,13] [,14] [,15] [,16] [,17] [,18] row3 1.825034884 -0.3062428 -1.46397791 0.5471639 1.363347 -0.1377852 row1 0.006525893 1.9927983 -0.06820158 1.0655167 0.776700 0.6949173 [,19] [,20] row3 0.08209427 0.80719687 row1 0.10480868 -0.01244192 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3227778 0.6528205 0.7392159 -1.535711 0.880866 1.792808 0.191688 [,8] [,9] [,10] row2 -0.04737148 -0.6824395 -1.374825 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.3985228 0.9161469 0.2833292 0.6237803 -0.5222775 0.2182518 -0.3881564 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.095288 0.607865 0.2714014 -0.845045 -0.6846182 -0.00366081 -0.4562798 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.7779485 -1.244607 0.5444851 1.035173 -0.4848022 -0.8438077 > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > colnames(tmp) <- NULL > rownames(tmp) <- NULL > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > dimnames(tmp) [[1]] [1] "row1" "row2" "row3" "row4" "row5" [[2]] [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > > dimnames(tmp) <- NULL > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > dimnames(tmp) [[1]] NULL [[2]] [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > > > dimnames(tmp) <- NULL > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > dimnames(tmp) [[1]] [1] "row1" "row2" "row3" "row4" "row5" [[2]] NULL > > dimnames(tmp) <- list(NULL,c(colnames(tmp,do.NULL=FALSE))) > dimnames(tmp) [[1]] NULL [[2]] [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > > > > ### > ### Testing logical indexing > ### > ### > > tmp <- createBufferedMatrix(230,15) > tmp[1:230,1:15] <- rnorm(230*15) > x <-tmp[1:230,1:15] > > for (rep in 1:10){ + which.cols <- sample(c(TRUE,FALSE),15,replace=T) + which.rows <- sample(c(TRUE,FALSE),230,replace=T) + + if (!all(tmp[which.rows,which.cols] == x[which.rows,which.cols])){ + stop("No agreement when logical indexing\n") + } + + if (!all(subBufferedMatrix(tmp,,which.cols)[,1:sum(which.cols)] == x[,which.cols])){ + stop("No agreement when logical indexing in subBufferedMatrix cols\n") + } + if (!all(subBufferedMatrix(tmp,which.rows,)[1:sum(which.rows),] == x[which.rows,])){ + stop("No agreement when logical indexing in subBufferedMatrix rows\n") + } + + + if (!all(subBufferedMatrix(tmp,which.rows,which.cols)[1:sum(which.rows),1:sum(which.cols)]== x[which.rows,which.cols])){ + stop("No agreement when logical indexing in subBufferedMatrix rows and columns\n") + } + } > > > ## > ## Test the ReadOnlyMode > ## > > ReadOnlyMode(tmp) <pointer: 0xaaaabf259bb0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c96bf8d1eb" [2] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c9763b1e60" [3] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c95e43ccc7" [4] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c97ceaa93e" [5] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c92a9ec3d4" [6] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c91acdfa2" [7] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c96e86efe1" [8] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c924122b2c" [9] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c92630d75" [10] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c91fe0b910" [11] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c9264184ed" [12] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c9c245411" [13] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c932be9c8f" [14] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c974621282" [15] "/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests/BM3646c9777b21ca" > > > ### testing coercion functions > ### > > tmp <- as(tmp,"matrix") > tmp <- as(tmp,"BufferedMatrix") > > > > ### testing whether can move storage from one location to another > > MoveStorageDirectory(tmp,"NewDirectory",full.path=FALSE) <pointer: 0xaaaac01b2360> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0xaaaac01b2360> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0xaaaac01b2360> > rowMedians(tmp) [1] 0.216225116 -0.429301629 0.317193616 0.107912700 -0.014283638 [6] -0.396801013 -0.545261612 0.302434988 -0.388667281 0.397413668 [11] -0.272939976 -0.462609985 -0.061281825 -0.032125244 0.150805074 [16] -0.477403380 0.380358581 -0.100043199 0.697773746 0.635367657 [21] -0.140246366 0.569584825 -0.118938754 0.075539461 -0.080603076 [26] -0.133384936 -0.396526775 0.164658959 0.020792806 -0.044813478 [31] -0.406199409 -0.096276187 0.533614151 -0.175249868 0.277711297 [36] 0.227779290 -0.201958900 -0.238348334 -0.457810815 0.032360217 [41] -0.258481654 0.377381176 0.218986539 -0.148954002 0.353144666 [46] 0.099411336 0.475401521 0.161651977 -0.027627913 -0.151232013 [51] 0.653231268 0.201514554 -0.109977034 -0.936082327 0.035192862 [56] -0.028363101 -0.060147021 0.507053576 -0.569717877 -0.008327252 [61] 0.054139977 -0.073570833 -0.519032422 -0.010999087 0.333575427 [66] -0.634186141 0.125377424 -0.024239872 -0.279004660 -0.321682328 [71] -0.322122137 -0.175959842 0.012408061 0.421324656 -0.140802699 [76] 0.128655338 -0.537680430 0.386561726 0.088101379 0.173714790 [81] 0.131110252 -0.211054441 -0.541403093 0.079814906 0.067535644 [86] 0.769207253 0.210239821 0.017362411 -0.148906768 -0.180758312 [91] -0.049442005 -0.925788455 0.099833376 -0.105843914 -0.075562316 [96] -0.293091819 -0.162244118 -0.316463223 0.266213295 0.662317401 [101] 0.027321485 0.283705996 -0.494308073 -0.014277812 0.343953920 [106] 0.225629826 -0.092743774 0.457270888 -0.483611700 0.449905984 [111] 0.202493560 -0.026083935 -0.396166351 0.056172749 -0.062219679 [116] 0.324798444 -0.017337375 -0.308010814 0.280657615 0.334703963 [121] 0.471868902 0.612778848 0.306094052 -0.197760835 0.154493149 [126] -0.549162155 0.774532371 0.546090327 0.336292727 -0.199213636 [131] -0.507960982 -0.277546605 0.175817204 0.009115381 -0.488069781 [136] -0.116291514 -0.054341567 0.180826547 0.125738051 0.310855838 [141] -0.404496700 -0.220301609 -0.022746895 -0.137083458 -0.077603682 [146] 0.076052129 -0.133655158 0.385966660 0.369030139 -0.209719381 [151] 0.395045709 -0.669877601 0.074835008 0.684245603 -0.015088847 [156] -0.129495233 -0.377315879 -0.368494245 -0.399835775 0.091128275 [161] 0.343118188 0.226805365 0.340578925 -0.097403646 -0.304424597 [166] -0.139018027 0.593426178 0.195768107 -0.082849238 0.151528365 [171] -0.029480348 -0.095415384 0.402755726 -0.057900947 0.019267229 [176] -0.436557674 -0.331175797 -0.084143301 -0.001440860 -0.380781705 [181] -0.221287971 0.081396459 0.183985465 0.277506308 -0.400320979 [186] 0.318992478 0.138040411 0.228964408 -0.085723609 -0.015026974 [191] 0.010447189 0.042357289 -0.240295957 0.273773338 -0.131705242 [196] -0.776876837 0.147135610 0.709705302 0.392102806 -0.271571656 [201] -0.181810422 -0.362333527 -0.193154760 -0.049577760 0.031269366 [206] 0.185455192 0.373313921 0.178744162 -0.229010019 0.353992640 [211] -0.302713138 0.494138383 -0.064341031 0.251534379 -0.016728143 [216] -0.122217784 -0.159831014 0.586258038 -0.041513815 0.004970815 [221] -0.411340341 -0.100697155 0.175415532 0.208118174 0.396045329 [226] -0.434275790 -0.091047874 -0.090549670 0.142410609 -0.234219033 > > proc.time() user system elapsed 2.025 1.309 3.362
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2023-03-12 r83975) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0xaaab10036640> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0xaaab10036640> > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 10 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0xaaab10036640> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 10 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 0.000000 0.000000 0.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 0.000000 0.000000 0.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 0.000000 0.000000 0.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab10036640> > rm(P) > > #P <- .Call("R_bm_Destroy",P) > #.Call("R_bm_Destroy",P) > #.Call("R_bm_Test_C",P) > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,5) [1] TRUE > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 0 Buffer Rows: 1 Buffer Cols: 1 Printing Values <pointer: 0xaaab10cf1cb0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab10cf1cb0> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 1 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab10cf1cb0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab10cf1cb0> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 2 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab10cf1cb0> > rm(P) > > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,5) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xaaab11e8f920> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab11e8f920> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 2 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab11e8f920> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xaaab11e8f920> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 2 Buffer Rows: 5 Buffer Cols: 5 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab11e8f920> > > .Call("R_bm_RowMode",P) <pointer: 0xaaab11e8f920> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 2 Buffer Rows: 5 Buffer Cols: 5 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab11e8f920> > > .Call("R_bm_ColMode",P) <pointer: 0xaaab11e8f920> > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 2 Buffer Rows: 5 Buffer Cols: 5 Printing Values 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 <pointer: 0xaaab11e8f920> > rm(P) > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xaaab10f38fc0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0xaaab10f38fc0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab10f38fc0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab10f38fc0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile36474654879133" "BufferedMatrixFile36474660607619" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile36474654879133" "BufferedMatrixFile36474660607619" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0xaaab11dc51c0> > .Call("R_bm_isRowMode",P) [1] FALSE > rm(P) > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xaaab0fe01ef0> > .Call("R_bm_AddColumn",P) <pointer: 0xaaab0fe01ef0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xaaab0fe01ef0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0xaaab0fe01ef0> > rm(P) > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0xaaab10b40b60> > .Call("R_bm_getValue",P,3,3) [1] 6 > > .Call("R_bm_getValue",P,100000,10000) [1] NA > .Call("R_bm_setValue",P,3,3,12345.0) [1] TRUE > .Call("R_bm_Test_C2",P) Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Printing Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 12345.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0xaaab10b40b60> > rm(P) > > proc.time() user system elapsed 0.311 0.072 0.373
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2023-03-12 r83975) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.333 0.040 0.355