Back to Multiple platform build/check report for BioC 3.15 |
|
This page was generated on 2022-10-19 13:21:12 -0400 (Wed, 19 Oct 2022).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 20.04.5 LTS) | x86_64 | 4.2.1 (2022-06-23) -- "Funny-Looking Kid" | 4386 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" | 4138 |
merida1 | macOS 10.14.6 Mojave | x86_64 | 4.2.1 (2022-06-23) -- "Funny-Looking Kid" | 4205 |
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 229/2140 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.60.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 20.04.5 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 10.14.6 Mojave / x86_64 | OK | OK | WARNINGS | OK | |||||||||
Package: BufferedMatrix |
Version: 1.60.0 |
Command: F:\biocbuild\bbs-3.15-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.15-bioc\R\library --no-vignettes --timings BufferedMatrix_1.60.0.tar.gz |
StartedAt: 2022-10-18 22:35:09 -0400 (Tue, 18 Oct 2022) |
EndedAt: 2022-10-18 22:36:42 -0400 (Tue, 18 Oct 2022) |
EllapsedTime: 92.7 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.15-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.15-bioc\R\library --no-vignettes --timings BufferedMatrix_1.60.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.2.1 (2022-06-23 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.60.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 whether package 'BufferedMatrix' can be installed ... OK * 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 for x64 is not available File 'F:/biocbuild/bbs-3.15-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs. The detected symbols are linked into the code but might come from libraries and not actually be called. See 'Writing portable packages' in the 'Writing R Extensions' manual. * checking sizes of PDF files under 'inst/doc' ... OK * 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 ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See 'F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.15-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.15-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs gcc -I"F:/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"F:/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"F:/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"F:/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.15-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.15-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** 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 ** 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 version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (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.34 0.15 0.64
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (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] "F:/biocbuild/bbs-3.15-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 439968 23.5 946568 50.6 620965 33.2 Vcells 764121 5.9 8388608 64.0 1694357 13.0 > > > > > ## > ## 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] "Tue Oct 18 22:35:37 2022" > 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] "Tue Oct 18 22:35:38 2022" > > > 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: 0x000001d260e1eef0> > > > > 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] "Tue Oct 18 22:35:49 2022" > 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] "Tue Oct 18 22:35:54 2022" > > ColMode(tmp2) <pointer: 0x000001d260e1eef0> > > > > ### 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,] 98.6287873 1.56407347 1.61342823 0.6081477 [2,] -1.0412357 1.49838975 0.07358793 -0.2630899 [3,] 0.6054021 -0.92626968 1.39755078 0.1268599 [4,] 1.4971535 -0.01088669 -1.28183956 -1.5711492 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.6287873 1.56407347 1.61342823 0.6081477 [2,] 1.0412357 1.49838975 0.07358793 0.2630899 [3,] 0.6054021 0.92626968 1.39755078 0.1268599 [4,] 1.4971535 0.01088669 1.28183956 1.5711492 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9312027 1.2506292 1.270208 0.7798382 [2,] 1.0204096 1.2240873 0.271271 0.5129229 [3,] 0.7780759 0.9624291 1.182181 0.3561740 [4,] 1.2235822 0.1043393 1.132184 1.2534549 > > 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: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 222.94081 39.07037 39.31551 33.40653 [2,] 36.24533 38.73926 27.78630 30.39232 [3,] 33.38616 35.55056 38.21936 28.68860 [4,] 38.73298 26.05428 37.60367 39.10570 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001d260e1e9b0> > exp(tmp5) <pointer: 0x000001d260e1e9b0> > log(tmp5,2) <pointer: 0x000001d260e1e9b0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.0221 > Min(tmp5) [1] 53.205 > mean(tmp5) [1] 72.79407 > Sum(tmp5) [1] 14558.81 > Var(tmp5) [1] 849.8577 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 93.39847 67.10701 71.68084 71.99860 72.20471 67.92169 72.47654 70.38942 [9] 70.70825 70.05522 > rowSums(tmp5) [1] 1867.969 1342.140 1433.617 1439.972 1444.094 1358.434 1449.531 1407.788 [9] 1414.165 1401.104 > rowVars(tmp5) [1] 7706.95528 85.20824 99.72851 85.10370 58.10720 52.77029 [7] 84.66017 41.15403 87.43350 73.09573 > rowSd(tmp5) [1] 87.789266 9.230831 9.986416 9.225167 7.622808 7.264316 9.201096 [8] 6.415141 9.350588 8.549604 > rowMax(tmp5) [1] 464.02210 84.28375 90.01768 82.37946 84.40657 79.13436 89.56198 [8] 84.29529 90.95781 91.54983 > rowMin(tmp5) [1] 55.54468 53.20500 56.73579 54.22857 57.92473 54.51099 60.11913 59.22920 [9] 54.48971 54.25780 > > colMeans(tmp5) [1] 114.58228 73.04852 71.21212 68.23525 76.23535 68.32555 75.21532 [8] 69.21099 63.59309 67.33384 69.03558 71.04359 73.05665 69.98458 [15] 72.83540 69.81442 69.83595 71.47250 70.81645 70.99405 > colSums(tmp5) [1] 1145.8228 730.4852 712.1212 682.3525 762.3535 683.2555 752.1532 [8] 692.1099 635.9309 673.3384 690.3558 710.4359 730.5665 699.8458 [15] 728.3540 698.1442 698.3595 714.7250 708.1645 709.9405 > colVars(tmp5) [1] 15151.28894 75.18783 93.74755 42.48154 66.37746 91.75185 [7] 78.52799 69.04331 63.46586 64.61491 46.82695 55.18466 [13] 67.96147 111.66591 53.36769 98.98771 90.06344 113.95587 [19] 81.08612 68.74670 > colSd(tmp5) [1] 123.090572 8.671091 9.682332 6.517786 8.147237 9.578718 [7] 8.861602 8.309231 7.966546 8.038340 6.843022 7.428638 [13] 8.243875 10.567209 7.305319 9.949257 9.490176 10.675011 [19] 9.004783 8.291363 > colMax(tmp5) [1] 464.02210 84.13436 81.83008 81.39339 93.40523 88.24980 88.37300 [8] 79.65765 75.22168 77.85647 82.97112 79.60708 90.95781 90.01768 [15] 89.56198 82.44632 84.29529 86.80383 84.28375 81.68401 > colMin(tmp5) [1] 60.71373 54.22857 57.18260 59.71156 64.61673 57.44727 62.45426 58.64247 [9] 53.20500 54.48971 58.27049 56.97689 62.75391 58.98068 63.97818 54.51099 [17] 55.54468 54.25780 57.43467 57.33145 > > > ### 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] 93.39847 67.10701 71.68084 71.99860 72.20471 67.92169 72.47654 70.38942 [9] 70.70825 NA > rowSums(tmp5) [1] 1867.969 1342.140 1433.617 1439.972 1444.094 1358.434 1449.531 1407.788 [9] 1414.165 NA > rowVars(tmp5) [1] 7706.95528 85.20824 99.72851 85.10370 58.10720 52.77029 [7] 84.66017 41.15403 87.43350 50.13801 > rowSd(tmp5) [1] 87.789266 9.230831 9.986416 9.225167 7.622808 7.264316 9.201096 [8] 6.415141 9.350588 7.080820 > rowMax(tmp5) [1] 464.02210 84.28375 90.01768 82.37946 84.40657 79.13436 89.56198 [8] 84.29529 90.95781 NA > rowMin(tmp5) [1] 55.54468 53.20500 56.73579 54.22857 57.92473 54.51099 60.11913 59.22920 [9] 54.48971 NA > > colMeans(tmp5) [1] NA 73.04852 71.21212 68.23525 76.23535 68.32555 75.21532 69.21099 [9] 63.59309 67.33384 69.03558 71.04359 73.05665 69.98458 72.83540 69.81442 [17] 69.83595 71.47250 70.81645 70.99405 > colSums(tmp5) [1] NA 730.4852 712.1212 682.3525 762.3535 683.2555 752.1532 692.1099 [9] 635.9309 673.3384 690.3558 710.4359 730.5665 699.8458 728.3540 698.1442 [17] 698.3595 714.7250 708.1645 709.9405 > colVars(tmp5) [1] NA 75.18783 93.74755 42.48154 66.37746 91.75185 78.52799 [8] 69.04331 63.46586 64.61491 46.82695 55.18466 67.96147 111.66591 [15] 53.36769 98.98771 90.06344 113.95587 81.08612 68.74670 > colSd(tmp5) [1] NA 8.671091 9.682332 6.517786 8.147237 9.578718 8.861602 [8] 8.309231 7.966546 8.038340 6.843022 7.428638 8.243875 10.567209 [15] 7.305319 9.949257 9.490176 10.675011 9.004783 8.291363 > colMax(tmp5) [1] NA 84.13436 81.83008 81.39339 93.40523 88.24980 88.37300 79.65765 [9] 75.22168 77.85647 82.97112 79.60708 90.95781 90.01768 89.56198 82.44632 [17] 84.29529 86.80383 84.28375 81.68401 > colMin(tmp5) [1] NA 54.22857 57.18260 59.71156 64.61673 57.44727 62.45426 58.64247 [9] 53.20500 54.48971 58.27049 56.97689 62.75391 58.98068 63.97818 54.51099 [17] 55.54468 54.25780 57.43467 57.33145 > > Max(tmp5,na.rm=TRUE) [1] 464.0221 > Min(tmp5,na.rm=TRUE) [1] 53.205 > mean(tmp5,na.rm=TRUE) [1] 72.69982 > Sum(tmp5,na.rm=TRUE) [1] 14467.27 > Var(tmp5,na.rm=TRUE) [1] 852.3644 > > rowMeans(tmp5,na.rm=TRUE) [1] 93.39847 67.10701 71.68084 71.99860 72.20471 67.92169 72.47654 70.38942 [9] 70.70825 68.92393 > rowSums(tmp5,na.rm=TRUE) [1] 1867.969 1342.140 1433.617 1439.972 1444.094 1358.434 1449.531 1407.788 [9] 1414.165 1309.555 > rowVars(tmp5,na.rm=TRUE) [1] 7706.95528 85.20824 99.72851 85.10370 58.10720 52.77029 [7] 84.66017 41.15403 87.43350 50.13801 > rowSd(tmp5,na.rm=TRUE) [1] 87.789266 9.230831 9.986416 9.225167 7.622808 7.264316 9.201096 [8] 6.415141 9.350588 7.080820 > rowMax(tmp5,na.rm=TRUE) [1] 464.02210 84.28375 90.01768 82.37946 84.40657 79.13436 89.56198 [8] 84.29529 90.95781 80.39960 > rowMin(tmp5,na.rm=TRUE) [1] 55.54468 53.20500 56.73579 54.22857 57.92473 54.51099 60.11913 59.22920 [9] 54.48971 54.25780 > > colMeans(tmp5,na.rm=TRUE) [1] 117.14144 73.04852 71.21212 68.23525 76.23535 68.32555 75.21532 [8] 69.21099 63.59309 67.33384 69.03558 71.04359 73.05665 69.98458 [15] 72.83540 69.81442 69.83595 71.47250 70.81645 70.99405 > colSums(tmp5,na.rm=TRUE) [1] 1054.2730 730.4852 712.1212 682.3525 762.3535 683.2555 752.1532 [8] 692.1099 635.9309 673.3384 690.3558 710.4359 730.5665 699.8458 [15] 728.3540 698.1442 698.3595 714.7250 708.1645 709.9405 > colVars(tmp5,na.rm=TRUE) [1] 16971.52034 75.18783 93.74755 42.48154 66.37746 91.75185 [7] 78.52799 69.04331 63.46586 64.61491 46.82695 55.18466 [13] 67.96147 111.66591 53.36769 98.98771 90.06344 113.95587 [19] 81.08612 68.74670 > colSd(tmp5,na.rm=TRUE) [1] 130.274788 8.671091 9.682332 6.517786 8.147237 9.578718 [7] 8.861602 8.309231 7.966546 8.038340 6.843022 7.428638 [13] 8.243875 10.567209 7.305319 9.949257 9.490176 10.675011 [19] 9.004783 8.291363 > colMax(tmp5,na.rm=TRUE) [1] 464.02210 84.13436 81.83008 81.39339 93.40523 88.24980 88.37300 [8] 79.65765 75.22168 77.85647 82.97112 79.60708 90.95781 90.01768 [15] 89.56198 82.44632 84.29529 86.80383 84.28375 81.68401 > colMin(tmp5,na.rm=TRUE) [1] 60.71373 54.22857 57.18260 59.71156 64.61673 57.44727 62.45426 58.64247 [9] 53.20500 54.48971 58.27049 56.97689 62.75391 58.98068 63.97818 54.51099 [17] 55.54468 54.25780 57.43467 57.33145 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 93.39847 67.10701 71.68084 71.99860 72.20471 67.92169 72.47654 70.38942 [9] 70.70825 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1867.969 1342.140 1433.617 1439.972 1444.094 1358.434 1449.531 1407.788 [9] 1414.165 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7706.95528 85.20824 99.72851 85.10370 58.10720 52.77029 [7] 84.66017 41.15403 87.43350 NA > rowSd(tmp5,na.rm=TRUE) [1] 87.789266 9.230831 9.986416 9.225167 7.622808 7.264316 9.201096 [8] 6.415141 9.350588 NA > rowMax(tmp5,na.rm=TRUE) [1] 464.02210 84.28375 90.01768 82.37946 84.40657 79.13436 89.56198 [8] 84.29529 90.95781 NA > rowMin(tmp5,na.rm=TRUE) [1] 55.54468 53.20500 56.73579 54.22857 57.92473 54.51099 60.11913 59.22920 [9] 54.48971 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] NaN 73.09556 71.63800 69.17979 75.77265 68.34844 76.63321 68.37427 [9] 62.51444 66.34015 69.57068 70.91474 73.00747 70.20908 73.81953 69.78123 [17] 69.50422 73.38525 72.30332 70.43436 > colSums(tmp5,na.rm=TRUE) [1] 0.0000 657.8600 644.7420 622.6181 681.9539 615.1359 689.6989 615.3684 [9] 562.6300 597.0614 626.1362 638.2327 657.0672 631.8817 664.3758 628.0311 [17] 625.5380 660.4672 650.7299 633.9093 > colVars(tmp5,na.rm=TRUE) [1] NA 84.56141 103.42555 37.75516 72.26618 103.21493 65.72667 [8] 69.79750 58.30988 61.58336 49.45904 61.89595 76.42944 125.05718 [15] 49.14279 111.34879 100.08340 87.04118 66.35077 73.81603 > colSd(tmp5,na.rm=TRUE) [1] NA 9.195728 10.169835 6.144523 8.500952 10.159475 8.107199 [8] 8.354490 7.636091 7.847506 7.032712 7.867398 8.742393 11.182897 [15] 7.010192 10.552194 10.004169 9.329587 8.145598 8.591626 > colMax(tmp5,na.rm=TRUE) [1] -Inf 84.13436 81.83008 81.39339 93.40523 88.24980 88.37300 79.65765 [9] 75.22168 77.85647 82.97112 79.60708 90.95781 90.01768 89.56198 82.44632 [17] 84.29529 86.80383 84.28375 81.68401 > colMin(tmp5,na.rm=TRUE) [1] Inf 54.22857 57.18260 59.71156 64.61673 57.44727 64.48140 58.64247 [9] 53.20500 54.48971 58.27049 56.97689 62.75391 58.98068 66.88405 54.51099 [17] 55.54468 56.18285 62.67243 57.33145 > > > > > 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] 207.2354 314.0762 231.8718 245.1873 224.0048 270.2812 302.7431 159.8810 [9] 292.7390 140.6633 > apply(copymatrix,1,var,na.rm=TRUE) [1] 207.2354 314.0762 231.8718 245.1873 224.0048 270.2812 302.7431 159.8810 [9] 292.7390 140.6633 > > > > 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] -2.273737e-13 1.705303e-13 2.842171e-14 2.842171e-14 -3.979039e-13 [6] 2.842171e-14 0.000000e+00 1.421085e-14 0.000000e+00 -2.842171e-14 [11] -2.273737e-13 -5.684342e-14 -5.684342e-14 -1.705303e-13 -5.684342e-14 [16] 0.000000e+00 1.421085e-13 -1.421085e-13 5.684342e-14 1.136868e-13 > > > > > > > > > > > ## 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) + } 8 15 10 3 10 16 10 17 5 9 2 11 1 12 6 3 9 8 9 8 6 20 3 1 9 7 7 14 5 19 4 9 7 9 6 5 2 4 2 12 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.419304 > Min(tmp) [1] -2.231597 > mean(tmp) [1] -0.04965655 > Sum(tmp) [1] -4.965655 > Var(tmp) [1] 0.8499631 > > rowMeans(tmp) [1] -0.04965655 > rowSums(tmp) [1] -4.965655 > rowVars(tmp) [1] 0.8499631 > rowSd(tmp) [1] 0.9219344 > rowMax(tmp) [1] 2.419304 > rowMin(tmp) [1] -2.231597 > > colMeans(tmp) [1] -0.157843159 -0.141611971 0.966554765 2.419304444 -0.354886417 [6] 0.372254107 -0.830252717 0.232832110 -0.327374656 0.972272565 [11] 0.320502931 1.280186575 -1.502238014 0.540142687 0.724498484 [16] 0.744108840 -1.069393193 1.082969084 -1.226318719 -0.474268612 [21] 0.442584679 -0.965145954 -0.743901743 -0.009677912 -0.118859083 [26] -0.440912257 -1.277955497 0.537092694 0.865152448 0.140427199 [31] -1.255331095 0.384462542 1.922451999 -0.265497428 -0.093688524 [36] 1.468408181 -0.081097761 0.198586607 1.059531093 -0.153212141 [41] 0.296482925 -0.777556965 -0.335790886 -1.514601012 1.303863574 [46] -0.199718733 -0.679214482 -1.099620626 -0.663100533 -0.308019793 [51] 0.603625349 -0.212902782 -0.938560965 -0.413723871 0.307423616 [56] 0.772761455 -0.472058896 -0.156301683 -0.876599335 0.177203369 [61] 0.721632775 0.247263635 0.589114576 -0.135400927 1.517744647 [66] 0.527284900 -1.219812743 0.388673252 0.520026621 0.033521597 [71] -1.876346344 0.424836737 0.383995361 -0.152039006 0.051376859 [76] 0.449555582 -2.181838074 -1.154077830 0.280234876 -0.551137094 [81] -0.189161810 -0.286269253 -1.864989118 0.841067585 -0.997498867 [86] 0.843820559 -0.076229075 -0.366533692 0.654714299 -2.231596783 [91] 0.434869133 2.107329862 -0.223875358 -1.079729186 -1.818336962 [96] 0.980413268 -1.145021088 -0.186845364 -0.858533939 1.633694560 > colSums(tmp) [1] -0.157843159 -0.141611971 0.966554765 2.419304444 -0.354886417 [6] 0.372254107 -0.830252717 0.232832110 -0.327374656 0.972272565 [11] 0.320502931 1.280186575 -1.502238014 0.540142687 0.724498484 [16] 0.744108840 -1.069393193 1.082969084 -1.226318719 -0.474268612 [21] 0.442584679 -0.965145954 -0.743901743 -0.009677912 -0.118859083 [26] -0.440912257 -1.277955497 0.537092694 0.865152448 0.140427199 [31] -1.255331095 0.384462542 1.922451999 -0.265497428 -0.093688524 [36] 1.468408181 -0.081097761 0.198586607 1.059531093 -0.153212141 [41] 0.296482925 -0.777556965 -0.335790886 -1.514601012 1.303863574 [46] -0.199718733 -0.679214482 -1.099620626 -0.663100533 -0.308019793 [51] 0.603625349 -0.212902782 -0.938560965 -0.413723871 0.307423616 [56] 0.772761455 -0.472058896 -0.156301683 -0.876599335 0.177203369 [61] 0.721632775 0.247263635 0.589114576 -0.135400927 1.517744647 [66] 0.527284900 -1.219812743 0.388673252 0.520026621 0.033521597 [71] -1.876346344 0.424836737 0.383995361 -0.152039006 0.051376859 [76] 0.449555582 -2.181838074 -1.154077830 0.280234876 -0.551137094 [81] -0.189161810 -0.286269253 -1.864989118 0.841067585 -0.997498867 [86] 0.843820559 -0.076229075 -0.366533692 0.654714299 -2.231596783 [91] 0.434869133 2.107329862 -0.223875358 -1.079729186 -1.818336962 [96] 0.980413268 -1.145021088 -0.186845364 -0.858533939 1.633694560 > 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.157843159 -0.141611971 0.966554765 2.419304444 -0.354886417 [6] 0.372254107 -0.830252717 0.232832110 -0.327374656 0.972272565 [11] 0.320502931 1.280186575 -1.502238014 0.540142687 0.724498484 [16] 0.744108840 -1.069393193 1.082969084 -1.226318719 -0.474268612 [21] 0.442584679 -0.965145954 -0.743901743 -0.009677912 -0.118859083 [26] -0.440912257 -1.277955497 0.537092694 0.865152448 0.140427199 [31] -1.255331095 0.384462542 1.922451999 -0.265497428 -0.093688524 [36] 1.468408181 -0.081097761 0.198586607 1.059531093 -0.153212141 [41] 0.296482925 -0.777556965 -0.335790886 -1.514601012 1.303863574 [46] -0.199718733 -0.679214482 -1.099620626 -0.663100533 -0.308019793 [51] 0.603625349 -0.212902782 -0.938560965 -0.413723871 0.307423616 [56] 0.772761455 -0.472058896 -0.156301683 -0.876599335 0.177203369 [61] 0.721632775 0.247263635 0.589114576 -0.135400927 1.517744647 [66] 0.527284900 -1.219812743 0.388673252 0.520026621 0.033521597 [71] -1.876346344 0.424836737 0.383995361 -0.152039006 0.051376859 [76] 0.449555582 -2.181838074 -1.154077830 0.280234876 -0.551137094 [81] -0.189161810 -0.286269253 -1.864989118 0.841067585 -0.997498867 [86] 0.843820559 -0.076229075 -0.366533692 0.654714299 -2.231596783 [91] 0.434869133 2.107329862 -0.223875358 -1.079729186 -1.818336962 [96] 0.980413268 -1.145021088 -0.186845364 -0.858533939 1.633694560 > colMin(tmp) [1] -0.157843159 -0.141611971 0.966554765 2.419304444 -0.354886417 [6] 0.372254107 -0.830252717 0.232832110 -0.327374656 0.972272565 [11] 0.320502931 1.280186575 -1.502238014 0.540142687 0.724498484 [16] 0.744108840 -1.069393193 1.082969084 -1.226318719 -0.474268612 [21] 0.442584679 -0.965145954 -0.743901743 -0.009677912 -0.118859083 [26] -0.440912257 -1.277955497 0.537092694 0.865152448 0.140427199 [31] -1.255331095 0.384462542 1.922451999 -0.265497428 -0.093688524 [36] 1.468408181 -0.081097761 0.198586607 1.059531093 -0.153212141 [41] 0.296482925 -0.777556965 -0.335790886 -1.514601012 1.303863574 [46] -0.199718733 -0.679214482 -1.099620626 -0.663100533 -0.308019793 [51] 0.603625349 -0.212902782 -0.938560965 -0.413723871 0.307423616 [56] 0.772761455 -0.472058896 -0.156301683 -0.876599335 0.177203369 [61] 0.721632775 0.247263635 0.589114576 -0.135400927 1.517744647 [66] 0.527284900 -1.219812743 0.388673252 0.520026621 0.033521597 [71] -1.876346344 0.424836737 0.383995361 -0.152039006 0.051376859 [76] 0.449555582 -2.181838074 -1.154077830 0.280234876 -0.551137094 [81] -0.189161810 -0.286269253 -1.864989118 0.841067585 -0.997498867 [86] 0.843820559 -0.076229075 -0.366533692 0.654714299 -2.231596783 [91] 0.434869133 2.107329862 -0.223875358 -1.079729186 -1.818336962 [96] 0.980413268 -1.145021088 -0.186845364 -0.858533939 1.633694560 > colMedians(tmp) [1] -0.157843159 -0.141611971 0.966554765 2.419304444 -0.354886417 [6] 0.372254107 -0.830252717 0.232832110 -0.327374656 0.972272565 [11] 0.320502931 1.280186575 -1.502238014 0.540142687 0.724498484 [16] 0.744108840 -1.069393193 1.082969084 -1.226318719 -0.474268612 [21] 0.442584679 -0.965145954 -0.743901743 -0.009677912 -0.118859083 [26] -0.440912257 -1.277955497 0.537092694 0.865152448 0.140427199 [31] -1.255331095 0.384462542 1.922451999 -0.265497428 -0.093688524 [36] 1.468408181 -0.081097761 0.198586607 1.059531093 -0.153212141 [41] 0.296482925 -0.777556965 -0.335790886 -1.514601012 1.303863574 [46] -0.199718733 -0.679214482 -1.099620626 -0.663100533 -0.308019793 [51] 0.603625349 -0.212902782 -0.938560965 -0.413723871 0.307423616 [56] 0.772761455 -0.472058896 -0.156301683 -0.876599335 0.177203369 [61] 0.721632775 0.247263635 0.589114576 -0.135400927 1.517744647 [66] 0.527284900 -1.219812743 0.388673252 0.520026621 0.033521597 [71] -1.876346344 0.424836737 0.383995361 -0.152039006 0.051376859 [76] 0.449555582 -2.181838074 -1.154077830 0.280234876 -0.551137094 [81] -0.189161810 -0.286269253 -1.864989118 0.841067585 -0.997498867 [86] 0.843820559 -0.076229075 -0.366533692 0.654714299 -2.231596783 [91] 0.434869133 2.107329862 -0.223875358 -1.079729186 -1.818336962 [96] 0.980413268 -1.145021088 -0.186845364 -0.858533939 1.633694560 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.1578432 -0.141612 0.9665548 2.419304 -0.3548864 0.3722541 -0.8302527 [2,] -0.1578432 -0.141612 0.9665548 2.419304 -0.3548864 0.3722541 -0.8302527 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.2328321 -0.3273747 0.9722726 0.3205029 1.280187 -1.502238 0.5401427 [2,] 0.2328321 -0.3273747 0.9722726 0.3205029 1.280187 -1.502238 0.5401427 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.7244985 0.7441088 -1.069393 1.082969 -1.226319 -0.4742686 0.4425847 [2,] 0.7244985 0.7441088 -1.069393 1.082969 -1.226319 -0.4742686 0.4425847 [,22] [,23] [,24] [,25] [,26] [,27] [1,] -0.965146 -0.7439017 -0.009677912 -0.1188591 -0.4409123 -1.277955 [2,] -0.965146 -0.7439017 -0.009677912 -0.1188591 -0.4409123 -1.277955 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [1,] 0.5370927 0.8651524 0.1404272 -1.255331 0.3844625 1.922452 -0.2654974 [2,] 0.5370927 0.8651524 0.1404272 -1.255331 0.3844625 1.922452 -0.2654974 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] -0.09368852 1.468408 -0.08109776 0.1985866 1.059531 -0.1532121 0.2964829 [2,] -0.09368852 1.468408 -0.08109776 0.1985866 1.059531 -0.1532121 0.2964829 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -0.777557 -0.3357909 -1.514601 1.303864 -0.1997187 -0.6792145 -1.099621 [2,] -0.777557 -0.3357909 -1.514601 1.303864 -0.1997187 -0.6792145 -1.099621 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -0.6631005 -0.3080198 0.6036253 -0.2129028 -0.938561 -0.4137239 0.3074236 [2,] -0.6631005 -0.3080198 0.6036253 -0.2129028 -0.938561 -0.4137239 0.3074236 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.7727615 -0.4720589 -0.1563017 -0.8765993 0.1772034 0.7216328 0.2472636 [2,] 0.7727615 -0.4720589 -0.1563017 -0.8765993 0.1772034 0.7216328 0.2472636 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] 0.5891146 -0.1354009 1.517745 0.5272849 -1.219813 0.3886733 0.5200266 [2,] 0.5891146 -0.1354009 1.517745 0.5272849 -1.219813 0.3886733 0.5200266 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.0335216 -1.876346 0.4248367 0.3839954 -0.152039 0.05137686 0.4495556 [2,] 0.0335216 -1.876346 0.4248367 0.3839954 -0.152039 0.05137686 0.4495556 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -2.181838 -1.154078 0.2802349 -0.5511371 -0.1891618 -0.2862693 -1.864989 [2,] -2.181838 -1.154078 0.2802349 -0.5511371 -0.1891618 -0.2862693 -1.864989 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 0.8410676 -0.9974989 0.8438206 -0.07622907 -0.3665337 0.6547143 -2.231597 [2,] 0.8410676 -0.9974989 0.8438206 -0.07622907 -0.3665337 0.6547143 -2.231597 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.4348691 2.10733 -0.2238754 -1.079729 -1.818337 0.9804133 -1.145021 [2,] 0.4348691 2.10733 -0.2238754 -1.079729 -1.818337 0.9804133 -1.145021 [,98] [,99] [,100] [1,] -0.1868454 -0.8585339 1.633695 [2,] -0.1868454 -0.8585339 1.633695 > > > Max(tmp2) [1] 2.114079 > Min(tmp2) [1] -3.060984 > mean(tmp2) [1] -0.1263032 > Sum(tmp2) [1] -12.63032 > Var(tmp2) [1] 1.024447 > > rowMeans(tmp2) [1] -0.139583487 2.114078996 -0.835356127 0.907181904 0.007996613 [6] -0.224931520 0.202141525 0.303837609 0.527335505 -0.857434759 [11] 0.173805560 0.967843988 1.661819388 0.125552269 0.201689291 [16] 1.358938414 -0.323372937 0.055264603 -0.059284699 -0.698153143 [21] -0.142500823 -0.695183228 0.143316030 -1.180227807 -0.221321177 [26] -1.467938661 -0.916785174 -2.337558753 -0.924951344 0.639262959 [31] 0.762255576 1.340154449 1.164722284 -0.006754860 0.175247970 [36] -1.332176165 -0.706446013 -0.925459158 0.067558472 0.395323393 [41] 1.076254321 -0.333667212 1.005949372 -0.125988211 0.100609742 [46] 0.969678734 -0.084388404 -2.385899035 -0.340606245 0.326252172 [51] 0.337690713 1.611779211 -0.082108487 -0.849332404 0.242343952 [56] -1.039357404 0.548243232 0.163961133 0.581127404 0.531945846 [61] 0.410276246 0.235447724 -0.445013236 -2.441721567 -0.329276842 [66] 1.379996296 1.397818931 0.029099535 -0.662754922 -1.863645977 [71] 0.843333834 -0.161215739 -0.062880411 -1.056925402 1.003001954 [76] 1.388923400 -1.604830368 1.455570205 -1.223594560 -0.504895930 [81] 0.627433849 -0.272311085 -1.092933561 -0.961386652 -0.764271384 [86] -0.651436938 -0.218889356 -3.060984150 0.435537649 -1.421132704 [91] 1.681309941 -0.777966520 0.053990577 -2.285906671 0.011063918 [96] -2.502836292 -0.640337471 -0.218743890 0.154697966 -0.066330392 > rowSums(tmp2) [1] -0.139583487 2.114078996 -0.835356127 0.907181904 0.007996613 [6] -0.224931520 0.202141525 0.303837609 0.527335505 -0.857434759 [11] 0.173805560 0.967843988 1.661819388 0.125552269 0.201689291 [16] 1.358938414 -0.323372937 0.055264603 -0.059284699 -0.698153143 [21] -0.142500823 -0.695183228 0.143316030 -1.180227807 -0.221321177 [26] -1.467938661 -0.916785174 -2.337558753 -0.924951344 0.639262959 [31] 0.762255576 1.340154449 1.164722284 -0.006754860 0.175247970 [36] -1.332176165 -0.706446013 -0.925459158 0.067558472 0.395323393 [41] 1.076254321 -0.333667212 1.005949372 -0.125988211 0.100609742 [46] 0.969678734 -0.084388404 -2.385899035 -0.340606245 0.326252172 [51] 0.337690713 1.611779211 -0.082108487 -0.849332404 0.242343952 [56] -1.039357404 0.548243232 0.163961133 0.581127404 0.531945846 [61] 0.410276246 0.235447724 -0.445013236 -2.441721567 -0.329276842 [66] 1.379996296 1.397818931 0.029099535 -0.662754922 -1.863645977 [71] 0.843333834 -0.161215739 -0.062880411 -1.056925402 1.003001954 [76] 1.388923400 -1.604830368 1.455570205 -1.223594560 -0.504895930 [81] 0.627433849 -0.272311085 -1.092933561 -0.961386652 -0.764271384 [86] -0.651436938 -0.218889356 -3.060984150 0.435537649 -1.421132704 [91] 1.681309941 -0.777966520 0.053990577 -2.285906671 0.011063918 [96] -2.502836292 -0.640337471 -0.218743890 0.154697966 -0.066330392 > 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] -0.139583487 2.114078996 -0.835356127 0.907181904 0.007996613 [6] -0.224931520 0.202141525 0.303837609 0.527335505 -0.857434759 [11] 0.173805560 0.967843988 1.661819388 0.125552269 0.201689291 [16] 1.358938414 -0.323372937 0.055264603 -0.059284699 -0.698153143 [21] -0.142500823 -0.695183228 0.143316030 -1.180227807 -0.221321177 [26] -1.467938661 -0.916785174 -2.337558753 -0.924951344 0.639262959 [31] 0.762255576 1.340154449 1.164722284 -0.006754860 0.175247970 [36] -1.332176165 -0.706446013 -0.925459158 0.067558472 0.395323393 [41] 1.076254321 -0.333667212 1.005949372 -0.125988211 0.100609742 [46] 0.969678734 -0.084388404 -2.385899035 -0.340606245 0.326252172 [51] 0.337690713 1.611779211 -0.082108487 -0.849332404 0.242343952 [56] -1.039357404 0.548243232 0.163961133 0.581127404 0.531945846 [61] 0.410276246 0.235447724 -0.445013236 -2.441721567 -0.329276842 [66] 1.379996296 1.397818931 0.029099535 -0.662754922 -1.863645977 [71] 0.843333834 -0.161215739 -0.062880411 -1.056925402 1.003001954 [76] 1.388923400 -1.604830368 1.455570205 -1.223594560 -0.504895930 [81] 0.627433849 -0.272311085 -1.092933561 -0.961386652 -0.764271384 [86] -0.651436938 -0.218889356 -3.060984150 0.435537649 -1.421132704 [91] 1.681309941 -0.777966520 0.053990577 -2.285906671 0.011063918 [96] -2.502836292 -0.640337471 -0.218743890 0.154697966 -0.066330392 > rowMin(tmp2) [1] -0.139583487 2.114078996 -0.835356127 0.907181904 0.007996613 [6] -0.224931520 0.202141525 0.303837609 0.527335505 -0.857434759 [11] 0.173805560 0.967843988 1.661819388 0.125552269 0.201689291 [16] 1.358938414 -0.323372937 0.055264603 -0.059284699 -0.698153143 [21] -0.142500823 -0.695183228 0.143316030 -1.180227807 -0.221321177 [26] -1.467938661 -0.916785174 -2.337558753 -0.924951344 0.639262959 [31] 0.762255576 1.340154449 1.164722284 -0.006754860 0.175247970 [36] -1.332176165 -0.706446013 -0.925459158 0.067558472 0.395323393 [41] 1.076254321 -0.333667212 1.005949372 -0.125988211 0.100609742 [46] 0.969678734 -0.084388404 -2.385899035 -0.340606245 0.326252172 [51] 0.337690713 1.611779211 -0.082108487 -0.849332404 0.242343952 [56] -1.039357404 0.548243232 0.163961133 0.581127404 0.531945846 [61] 0.410276246 0.235447724 -0.445013236 -2.441721567 -0.329276842 [66] 1.379996296 1.397818931 0.029099535 -0.662754922 -1.863645977 [71] 0.843333834 -0.161215739 -0.062880411 -1.056925402 1.003001954 [76] 1.388923400 -1.604830368 1.455570205 -1.223594560 -0.504895930 [81] 0.627433849 -0.272311085 -1.092933561 -0.961386652 -0.764271384 [86] -0.651436938 -0.218889356 -3.060984150 0.435537649 -1.421132704 [91] 1.681309941 -0.777966520 0.053990577 -2.285906671 0.011063918 [96] -2.502836292 -0.640337471 -0.218743890 0.154697966 -0.066330392 > > colMeans(tmp2) [1] -0.1263032 > colSums(tmp2) [1] -12.63032 > colVars(tmp2) [1] 1.024447 > colSd(tmp2) [1] 1.01215 > colMax(tmp2) [1] 2.114079 > colMin(tmp2) [1] -3.060984 > colMedians(tmp2) [1] -0.06108255 > colRanges(tmp2) [,1] [1,] -3.060984 [2,] 2.114079 > > 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.6835764 7.2259394 4.3105422 1.2685415 -0.4601808 7.7440254 [7] 7.2405755 -3.1719862 -0.3092923 -2.3087478 > colApply(tmp,quantile)[,1] [,1] [1,] -2.2562668 [2,] -1.0367275 [3,] -0.4291436 [4,] 0.3802156 [5,] 2.2687709 > > rowApply(tmp,sum) [1] -3.815424 1.419450 5.329123 2.297195 3.759519 -1.845551 4.377653 [8] 5.062856 -2.059768 5.330787 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 1 10 10 4 2 5 2 3 3 [2,] 9 6 9 8 6 7 9 6 6 9 [3,] 8 8 7 4 2 10 7 5 2 6 [4,] 7 2 6 5 8 4 3 10 7 4 [5,] 4 4 3 3 1 3 10 9 4 7 [6,] 10 10 1 7 9 8 8 7 5 8 [7,] 6 7 8 9 3 6 4 8 8 10 [8,] 3 5 4 6 5 1 6 1 1 5 [9,] 5 9 2 1 10 5 2 4 10 2 [10,] 1 3 5 2 7 9 1 3 9 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.8833315 -1.0033747 -2.6586989 -4.3292193 1.5856896 0.2339281 [7] -0.7681259 -1.5089930 2.3580912 -0.2739402 -4.7612691 1.9272653 [13] 1.2908293 3.7851351 2.1224133 3.1773051 0.1173425 0.6999653 [19] 0.9037124 -1.6917602 > colApply(tmp,quantile)[,1] [,1] [1,] -0.4090358 [2,] -0.3438427 [3,] 0.2521798 [4,] 0.3559050 [5,] 1.0281252 > > rowApply(tmp,sum) [1] 0.7267711 -0.6113853 7.0064570 1.2815454 -6.3137609 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 8 7 16 15 [2,] 9 16 11 9 2 [3,] 19 15 2 3 5 [4,] 2 7 3 13 7 [5,] 6 18 15 10 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.3559050 -0.34206741 1.0684277 -1.42794578 -0.51656062 0.62890985 [2,] -0.4090358 0.54961232 0.3525983 -0.56593694 1.00887348 0.89843478 [3,] -0.3438427 0.40052264 -1.5077606 -1.46376185 1.30160918 -0.89326377 [4,] 1.0281252 -0.09554794 -1.4936043 0.04009956 -0.04384264 0.07799402 [5,] 0.2521798 -1.51589432 -1.0783600 -0.91167430 -0.16438982 -0.47814677 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.7437327 -0.1551217 -0.4174835 -0.7918546 -1.8485726 0.921931431 [2,] 0.1459325 -0.1886174 -0.8857577 -0.8331183 -0.7171651 -1.161199998 [3,] 0.5117216 -0.7905208 2.5337031 1.1874125 -0.2503655 2.775891677 [4,] -1.9192279 0.7207149 2.0637825 -0.2758961 -0.1259584 -0.004957016 [5,] -0.2502849 -1.0954479 -0.9361533 0.4395162 -1.8192075 -0.604400815 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.73139456 1.01959962 0.5534059 1.5444917 -0.69063817 0.87644709 [2,] 0.08814768 1.65308118 2.5822644 0.3175025 -1.95252341 0.01634713 [3,] 1.89248278 0.09547805 -2.0031945 -0.1731607 1.94093273 0.66439406 [4,] -0.76794427 1.45235241 1.6480399 -0.7757493 0.01258615 -0.13430286 [5,] 0.80953765 -0.43537620 -0.6581025 2.2642209 0.80698523 -0.72292011 [,19] [,20] [1,] -0.4998029 0.43536191 [2,] -1.5545105 0.04368564 [3,] 1.9427762 -0.81459708 [4,] 2.1446394 -2.26975810 [5,] -1.1293897 0.91354744 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 625 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 542 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 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 0.6604473 -0.2187659 -1.243623 -1.264038 -0.4793024 0.5074537 1.039695 col8 col9 col10 col11 col12 col13 col14 row1 -0.6235181 -1.271824 0.473455 -0.6706546 -2.324984 0.1609475 -1.937286 col15 col16 col17 col18 col19 col20 row1 1.502343 0.003372167 -1.300273 -0.8783436 0.7712963 1.072488 > tmp[,"col10"] col10 row1 0.4734550 row2 -0.7652063 row3 0.8045968 row4 1.0292015 row5 1.1007591 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.6604473 -0.2187659 -1.243623 -1.2640383 -0.4793024 0.5074537 1.039695 row5 -0.1806012 -0.1671137 -1.260016 0.3007844 -0.9975488 2.5041497 -1.273374 col8 col9 col10 col11 col12 col13 col14 row1 -0.6235181 -1.2718244 0.473455 -0.6706546 -2.324984 0.1609475 -1.937286 row5 -0.4510261 -0.9291937 1.100759 0.2561991 0.855942 1.6126328 1.278549 col15 col16 col17 col18 col19 col20 row1 1.502343 0.003372167 -1.3002728 -0.8783436 0.7712963 1.0724884 row5 -1.258464 0.982803983 0.1940307 0.7778414 -0.1128641 0.6603339 > tmp[,c("col6","col20")] col6 col20 row1 0.5074537 1.0724884 row2 -1.5866152 1.3223584 row3 -1.9860771 0.3322900 row4 -0.2070111 -0.4075135 row5 2.5041497 0.6603339 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.5074537 1.0724884 row5 2.5041497 0.6603339 > > > > > 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 50.067 50.89946 49.42733 51.04358 51.80077 103.2131 49.77905 49.29172 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.18152 52.64218 51.10686 48.8446 47.93426 49.42691 48.31524 51.34869 col17 col18 col19 col20 row1 50.05525 48.88821 49.22422 105.9373 > tmp[,"col10"] col10 row1 52.64218 row2 28.42561 row3 29.40212 row4 30.84653 row5 51.38475 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.06700 50.89946 49.42733 51.04358 51.80077 103.2131 49.77905 49.29172 row5 49.37351 50.06067 50.88071 49.16696 48.44624 106.4826 50.41499 49.83681 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.18152 52.64218 51.10686 48.84460 47.93426 49.42691 48.31524 51.34869 row5 50.70830 51.38475 49.93372 48.23959 49.10896 49.93722 50.54793 48.91145 col17 col18 col19 col20 row1 50.05525 48.88821 49.22422 105.9373 row5 48.73876 51.70527 49.54031 104.3032 > tmp[,c("col6","col20")] col6 col20 row1 103.21313 105.93727 row2 75.37775 77.28697 row3 75.59938 74.77105 row4 75.11849 75.59713 row5 106.48260 104.30320 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.2131 105.9373 row5 106.4826 104.3032 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.2131 105.9373 row5 106.4826 104.3032 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.6304168 [2,] -0.4256858 [3,] -1.9775820 [4,] 2.2380983 [5,] -0.1259417 > tmp[,c("col17","col7")] col17 col7 [1,] 2.5650810 -0.1311073 [2,] -2.0432822 0.7373570 [3,] -0.2352400 2.4040370 [4,] -0.1052562 -0.8965254 [5,] 1.9406503 0.9251990 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.14419386 0.1744017 [2,] -1.47982938 1.0212704 [3,] -0.83480371 0.1340547 [4,] -0.06533678 -0.3593222 [5,] 1.55211638 0.8033473 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.144194 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.144194 [2,] -1.479829 > > > > 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] [,7] row3 -0.3959727 0.5093683 0.1349192 -0.8995613 0.3100501 -1.0680910 0.8873334 row1 0.4795512 0.2526717 1.6265580 -0.2780612 0.3712832 0.4408899 0.6599841 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.10673586 -0.1587944 0.1013718 0.1875299 -0.55570470 1.5866823 row1 -0.02158477 0.3801870 -0.5857332 -0.1282750 0.03886091 0.8896245 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.2270033 0.2852535 0.1937739 1.4317361 0.8654303 -0.329212 -0.7841644 row1 0.6903399 -0.4211704 -0.4872067 0.4088616 1.3009736 1.394414 1.7891171 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.474524 1.293623 -0.5111362 -0.08225335 1.040036 -1.608239 -0.352723 [,8] [,9] [,10] row2 -1.088272 0.9182814 1.060301 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1928826 -0.7932692 -0.873211 -1.54766 0.08976965 0.1222322 -0.441606 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.7357263 -1.235777 0.2336387 1.111115 0.04705914 0.9193678 -2.420338 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.594654 -0.6371866 1.056284 -0.2121025 -1.709996 0.2286212 > > > 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: 0x000001d262372fb0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b07ee4fe9" [2] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b036b7671a" [3] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b087d7818" [4] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b01b676a22" [5] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b0709318ec" [6] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b056292c6b" [7] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b01047100a" [8] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b04e404c65" [9] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b077081ffd" [10] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b06dbe568d" [11] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b037ac1bda" [12] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b0773f2e37" [13] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b0bc0361f" [14] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b063d7738a" [15] "F:/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests\\BM30b0411d36e1" > > > ### 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: 0x000001d262373330> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001d262373330> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.15-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001d262373330> > rowMedians(tmp) [1] 0.965103468 -0.713437790 -0.102361402 -0.193323097 -0.081858457 [6] 0.008336322 -0.102764854 -0.023489723 0.028904804 0.573079805 [11] 0.226802184 0.033958345 -0.082205685 -0.315488023 0.075661370 [16] 0.402861315 -0.195968423 -0.307532135 0.416561480 -0.486798036 [21] 0.079541597 0.400681017 0.279345904 0.125584241 -0.329346363 [26] 0.703589047 0.025869318 0.402672668 -0.016228320 0.046718862 [31] 0.144556260 -0.043239808 0.146477473 -0.870193394 -0.378199024 [36] 0.104211747 -0.032631518 0.516988525 0.268737947 0.001125947 [41] 0.212961947 -0.020618866 -0.131355210 0.251970607 0.480151016 [46] -0.229000946 -0.295968364 0.042671633 -0.302664381 0.114793604 [51] -0.278643742 0.139683147 -0.173086975 -0.196496815 0.128349661 [56] 0.001195537 -0.583751556 -0.059911127 0.285526652 0.141152231 [61] -0.084277337 -0.499739848 0.035102660 -0.175148670 0.169009597 [66] -0.230022254 -0.052266942 -0.344104869 -0.152494447 0.242966537 [71] -0.414331949 -0.393850573 0.071920572 -0.063313117 0.003861301 [76] -0.025795095 -0.068103950 -0.174814418 0.553088448 0.235619410 [81] -0.611219571 -0.352384249 0.422147217 0.426063301 -0.634202530 [86] -0.140698234 -0.399418241 0.227183612 -0.433751412 -0.039450529 [91] 0.355632886 -0.161589311 -0.247007536 -0.136166828 -0.291094128 [96] -0.184370198 0.173976979 0.097932989 0.154935121 -0.430630883 [101] 0.029153541 0.524957834 0.410013365 -0.150488376 0.734669563 [106] -0.224873755 -0.248853369 -0.237896354 0.128660728 -0.301308234 [111] 0.066589855 -0.408224060 -0.060962724 -0.137428204 -0.368969009 [116] -0.409132111 -0.169496640 -0.085014874 0.273111806 -0.254335743 [121] -0.262769980 0.045489741 -0.017016425 -0.331812606 0.136669095 [126] -0.529157741 -0.766885619 -0.108658152 0.372966988 -0.119147609 [131] 0.071818562 -0.480426854 -0.306618147 0.195146007 -0.032803461 [136] 0.058559974 -0.039049412 0.126806659 0.137151044 0.035828985 [141] 0.200992396 -0.186664100 -0.262534046 0.194472247 0.393063481 [146] -0.667434982 -0.206535218 -0.167638470 -0.391400119 0.336173236 [151] -0.251452373 0.112658165 -0.637896335 0.125471039 0.099470264 [156] 0.322040806 -0.666283221 -0.095993239 -0.272249171 -0.069398723 [161] 0.563585237 -0.371465994 0.387053657 0.670376456 -0.316362949 [166] -0.545288101 0.293558693 0.735783912 0.261044811 0.124951385 [171] 0.649165584 -0.049465997 -0.024428781 0.068659490 -0.508212859 [176] 0.164172022 0.190858820 -0.052755249 -0.018266684 -0.892310155 [181] 0.186901229 0.189916799 -0.076938750 0.282382688 0.397600798 [186] -0.318307583 0.144962660 0.242530758 0.033148030 -0.428508049 [191] 0.339985230 -0.301316966 0.447331891 0.144405285 -0.344324919 [196] 0.310841052 -0.156816412 0.564657190 0.441483993 0.533796768 [201] 0.341162369 0.007716035 0.243839963 -0.267777953 0.625869397 [206] 0.382653090 0.271946544 0.116136564 -0.012411687 -0.741719915 [211] 0.120663763 0.149419206 -0.412572011 0.610710305 0.182580600 [216] 0.078467543 0.270548559 -0.067791284 -0.348677501 0.106423996 [221] 0.006559382 0.010064818 0.187325957 -0.047068917 -0.200926559 [226] -0.217147506 -0.189473377 -0.186859331 0.595580787 0.277890863 > > proc.time() user system elapsed 3.35 18.82 56.59
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (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: 0x000002980ed55d90> > .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: 0x000002980ed55d90> > .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: 0x000002980ed55d90> > .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: 0x000002980ed55d90> > 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: 0x000002980ed55b60> > .Call("R_bm_AddColumn",P) <pointer: 0x000002980ed55b60> > .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: 0x000002980ed55b60> > .Call("R_bm_AddColumn",P) <pointer: 0x000002980ed55b60> > .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: 0x000002980ed55b60> > 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: 0x000002980ed55e00> > .Call("R_bm_AddColumn",P) <pointer: 0x000002980ed55e00> > .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: 0x000002980ed55e00> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000002980ed55e00> > .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: 0x000002980ed55e00> > > .Call("R_bm_RowMode",P) <pointer: 0x000002980ed55e00> > .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: 0x000002980ed55e00> > > .Call("R_bm_ColMode",P) <pointer: 0x000002980ed55e00> > .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: 0x000002980ed55e00> > 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: 0x000002980ed55700> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000002980ed55700> > .Call("R_bm_AddColumn",P) <pointer: 0x000002980ed55700> > .Call("R_bm_AddColumn",P) <pointer: 0x000002980ed55700> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3fa817f84f57" "BufferedMatrixFile3fa87bf64dae" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3fa817f84f57" "BufferedMatrixFile3fa87bf64dae" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x0000029811d07580> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029811d07580> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029811d07580> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029811d07580> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x0000029811d07580> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x0000029811d07580> > .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: 0x0000029811d07890> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029811d07890> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000029811d07890> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x0000029811d07890> > 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: 0x0000029811d07350> > .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: 0x0000029811d07350> > rm(P) > > proc.time() user system elapsed 0.31 0.18 0.57
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (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.34 0.04 0.37