Back to Multiple platform build/check report for BioC 3.18: simplified long |
|
This page was generated on 2024-04-17 11:36:36 -0400 (Wed, 17 Apr 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4676 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" | 4414 |
merida1 | macOS 12.7.1 Monterey | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4437 |
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 |
Package 246/2266 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.66.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.1 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - 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 Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.66.0 |
Command: F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.18-bioc\R\library --no-vignettes --timings BufferedMatrix_1.66.0.tar.gz |
StartedAt: 2024-04-15 22:54:39 -0400 (Mon, 15 Apr 2024) |
EndedAt: 2024-04-15 22:55:42 -0400 (Mon, 15 Apr 2024) |
EllapsedTime: 63.3 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.18-bioc\R\library --no-vignettes --timings BufferedMatrix_1.66.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.3.3 (2024-02-29 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.66.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 * used C compiler: 'gcc.exe (GCC) 12.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 for x64 is not available File 'F:/biocbuild/bbs-3.18-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 nor [v]sprintf. 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.18-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.18-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 12.3.0' gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -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){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: 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.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -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:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.18-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.18-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.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 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.57
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 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.18-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 454760 24.3 979027 52.3 640574 34.3 Vcells 825530 6.3 8388608 64.0 1998750 15.3 > > > > > ## > ## 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] "Mon Apr 15 22:55:03 2024" > 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] "Mon Apr 15 22:55:04 2024" > > > 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: 0x000001e8361272a0> > > > > 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] "Mon Apr 15 22:55:10 2024" > 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] "Mon Apr 15 22:55:13 2024" > > ColMode(tmp2) <pointer: 0x000001e8361272a0> > > > > ### 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,] 100.33679124 0.9949167 0.8017680 -1.1972761 [2,] -0.82254539 -0.1601507 -0.5195544 0.7878911 [3,] 0.45361948 -0.3518993 1.0585338 0.7036988 [4,] 0.02933768 0.1802266 0.2811446 0.7505447 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-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,] 100.33679124 0.9949167 0.8017680 1.1972761 [2,] 0.82254539 0.1601507 0.5195544 0.7878911 [3,] 0.45361948 0.3518993 1.0585338 0.7036988 [4,] 0.02933768 0.1802266 0.2811446 0.7505447 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-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,] 10.0168254 0.9974551 0.8954150 1.0942011 [2,] 0.9069429 0.4001883 0.7208012 0.8876323 [3,] 0.6735128 0.5932110 1.0288507 0.8388675 [4,] 0.1712824 0.4245311 0.5302307 0.8663398 > > 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.18-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,] 225.50505 35.96947 34.75592 37.13929 [2,] 34.89197 29.16203 32.72757 34.66421 [3,] 32.18875 31.28401 36.34704 34.09237 [4,] 26.74216 29.42554 30.58345 34.41394 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001e8361273f0> > exp(tmp5) <pointer: 0x000001e8361273f0> > log(tmp5,2) <pointer: 0x000001e8361273f0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.3592 > Min(tmp5) [1] 53.45106 > mean(tmp5) [1] 72.79597 > Sum(tmp5) [1] 14559.19 > Var(tmp5) [1] 878.3546 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.64494 70.01176 72.92760 69.50236 71.65167 72.20176 68.01563 73.26145 [9] 68.84589 69.89659 > rowSums(tmp5) [1] 1832.899 1400.235 1458.552 1390.047 1433.033 1444.035 1360.313 1465.229 [9] 1376.918 1397.932 > rowVars(tmp5) [1] 7982.92046 104.17059 97.25920 90.61456 98.28859 84.31354 [7] 84.95529 74.99123 59.97591 77.23363 > rowSd(tmp5) [1] 89.347191 10.206399 9.862008 9.519168 9.914060 9.182240 9.217119 [8] 8.659748 7.744411 8.788266 > rowMax(tmp5) [1] 469.35921 87.76291 91.54442 90.22537 88.66960 89.37086 91.65110 [8] 86.18076 83.74694 81.09533 > rowMin(tmp5) [1] 53.45106 55.06465 60.58719 55.66031 58.34940 54.93287 57.53123 57.09440 [9] 54.20900 55.15909 > > colMeans(tmp5) [1] 106.87593 68.46688 70.04661 70.04426 73.32744 70.92068 68.62094 [8] 76.77236 73.34589 72.91161 72.61152 69.74073 71.97788 71.94151 [15] 71.52842 71.84420 68.75103 68.27086 70.64060 67.27995 > colSums(tmp5) [1] 1068.7593 684.6688 700.4661 700.4426 733.2744 709.2068 686.2094 [8] 767.7236 733.4589 729.1161 726.1152 697.4073 719.7788 719.4151 [15] 715.2842 718.4420 687.5103 682.7086 706.4060 672.7995 > colVars(tmp5) [1] 16292.43984 75.77558 80.27089 63.54997 44.63262 123.73561 [7] 85.34487 130.10009 96.28611 69.52240 106.13023 56.65293 [13] 102.19405 93.43411 107.69935 77.07223 56.61919 97.49592 [19] 112.38184 85.76423 > colSd(tmp5) [1] 127.641842 8.704917 8.959402 7.971823 6.680765 11.123651 [7] 9.238229 11.406143 9.812549 8.338010 10.301953 7.526814 [13] 10.109107 9.666132 10.377830 8.779079 7.524572 9.874002 [19] 10.601030 9.260898 > colMax(tmp5) [1] 469.35921 89.37086 81.81922 78.64955 82.80119 89.28395 83.74694 [8] 91.65110 88.50533 86.49179 90.92814 79.81729 88.66960 90.21128 [15] 90.22537 86.73892 85.69225 86.18076 85.56293 86.87253 > colMin(tmp5) [1] 54.20900 59.57720 55.15909 57.53123 60.58719 55.17220 57.69188 60.50714 [9] 60.81224 62.65011 62.73370 60.21093 58.52316 60.35137 53.45106 55.06465 [17] 60.65104 55.77857 57.16874 54.93287 > > > ### 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] 91.64494 70.01176 72.92760 NA 71.65167 72.20176 68.01563 73.26145 [9] 68.84589 69.89659 > rowSums(tmp5) [1] 1832.899 1400.235 1458.552 NA 1433.033 1444.035 1360.313 1465.229 [9] 1376.918 1397.932 > rowVars(tmp5) [1] 7982.92046 104.17059 97.25920 83.41655 98.28859 84.31354 [7] 84.95529 74.99123 59.97591 77.23363 > rowSd(tmp5) [1] 89.347191 10.206399 9.862008 9.133266 9.914060 9.182240 9.217119 [8] 8.659748 7.744411 8.788266 > rowMax(tmp5) [1] 469.35921 87.76291 91.54442 NA 88.66960 89.37086 91.65110 [8] 86.18076 83.74694 81.09533 > rowMin(tmp5) [1] 53.45106 55.06465 60.58719 NA 58.34940 54.93287 57.53123 57.09440 [9] 54.20900 55.15909 > > colMeans(tmp5) [1] 106.87593 68.46688 70.04661 70.04426 73.32744 70.92068 68.62094 [8] 76.77236 NA 72.91161 72.61152 69.74073 71.97788 71.94151 [15] 71.52842 71.84420 68.75103 68.27086 70.64060 67.27995 > colSums(tmp5) [1] 1068.7593 684.6688 700.4661 700.4426 733.2744 709.2068 686.2094 [8] 767.7236 NA 729.1161 726.1152 697.4073 719.7788 719.4151 [15] 715.2842 718.4420 687.5103 682.7086 706.4060 672.7995 > colVars(tmp5) [1] 16292.43984 75.77558 80.27089 63.54997 44.63262 123.73561 [7] 85.34487 130.10009 NA 69.52240 106.13023 56.65293 [13] 102.19405 93.43411 107.69935 77.07223 56.61919 97.49592 [19] 112.38184 85.76423 > colSd(tmp5) [1] 127.641842 8.704917 8.959402 7.971823 6.680765 11.123651 [7] 9.238229 11.406143 NA 8.338010 10.301953 7.526814 [13] 10.109107 9.666132 10.377830 8.779079 7.524572 9.874002 [19] 10.601030 9.260898 > colMax(tmp5) [1] 469.35921 89.37086 81.81922 78.64955 82.80119 89.28395 83.74694 [8] 91.65110 NA 86.49179 90.92814 79.81729 88.66960 90.21128 [15] 90.22537 86.73892 85.69225 86.18076 85.56293 86.87253 > colMin(tmp5) [1] 54.20900 59.57720 55.15909 57.53123 60.58719 55.17220 57.69188 60.50714 [9] NA 62.65011 62.73370 60.21093 58.52316 60.35137 53.45106 55.06465 [17] 60.65104 55.77857 57.16874 54.93287 > > Max(tmp5,na.rm=TRUE) [1] 469.3592 > Min(tmp5,na.rm=TRUE) [1] 53.45106 > mean(tmp5,na.rm=TRUE) [1] 72.73984 > Sum(tmp5,na.rm=TRUE) [1] 14475.23 > Var(tmp5,na.rm=TRUE) [1] 882.1575 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.64494 70.01176 72.92760 68.74117 71.65167 72.20176 68.01563 73.26145 [9] 68.84589 69.89659 > rowSums(tmp5,na.rm=TRUE) [1] 1832.899 1400.235 1458.552 1306.082 1433.033 1444.035 1360.313 1465.229 [9] 1376.918 1397.932 > rowVars(tmp5,na.rm=TRUE) [1] 7982.92046 104.17059 97.25920 83.41655 98.28859 84.31354 [7] 84.95529 74.99123 59.97591 77.23363 > rowSd(tmp5,na.rm=TRUE) [1] 89.347191 10.206399 9.862008 9.133266 9.914060 9.182240 9.217119 [8] 8.659748 7.744411 8.788266 > rowMax(tmp5,na.rm=TRUE) [1] 469.35921 87.76291 91.54442 90.22537 88.66960 89.37086 91.65110 [8] 86.18076 83.74694 81.09533 > rowMin(tmp5,na.rm=TRUE) [1] 53.45106 55.06465 60.58719 55.66031 58.34940 54.93287 57.53123 57.09440 [9] 54.20900 55.15909 > > colMeans(tmp5,na.rm=TRUE) [1] 106.87593 68.46688 70.04661 70.04426 73.32744 70.92068 68.62094 [8] 76.77236 72.16598 72.91161 72.61152 69.74073 71.97788 71.94151 [15] 71.52842 71.84420 68.75103 68.27086 70.64060 67.27995 > colSums(tmp5,na.rm=TRUE) [1] 1068.7593 684.6688 700.4661 700.4426 733.2744 709.2068 686.2094 [8] 767.7236 649.4938 729.1161 726.1152 697.4073 719.7788 719.4151 [15] 715.2842 718.4420 687.5103 682.7086 706.4060 672.7995 > colVars(tmp5,na.rm=TRUE) [1] 16292.43984 75.77558 80.27089 63.54997 44.63262 123.73561 [7] 85.34487 130.10009 92.65979 69.52240 106.13023 56.65293 [13] 102.19405 93.43411 107.69935 77.07223 56.61919 97.49592 [19] 112.38184 85.76423 > colSd(tmp5,na.rm=TRUE) [1] 127.641842 8.704917 8.959402 7.971823 6.680765 11.123651 [7] 9.238229 11.406143 9.625995 8.338010 10.301953 7.526814 [13] 10.109107 9.666132 10.377830 8.779079 7.524572 9.874002 [19] 10.601030 9.260898 > colMax(tmp5,na.rm=TRUE) [1] 469.35921 89.37086 81.81922 78.64955 82.80119 89.28395 83.74694 [8] 91.65110 88.50533 86.49179 90.92814 79.81729 88.66960 90.21128 [15] 90.22537 86.73892 85.69225 86.18076 85.56293 86.87253 > colMin(tmp5,na.rm=TRUE) [1] 54.20900 59.57720 55.15909 57.53123 60.58719 55.17220 57.69188 60.50714 [9] 60.81224 62.65011 62.73370 60.21093 58.52316 60.35137 53.45106 55.06465 [17] 60.65104 55.77857 57.16874 54.93287 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.64494 70.01176 72.92760 NaN 71.65167 72.20176 68.01563 73.26145 [9] 68.84589 69.89659 > rowSums(tmp5,na.rm=TRUE) [1] 1832.899 1400.235 1458.552 0.000 1433.033 1444.035 1360.313 1465.229 [9] 1376.918 1397.932 > rowVars(tmp5,na.rm=TRUE) [1] 7982.92046 104.17059 97.25920 NA 98.28859 84.31354 [7] 84.95529 74.99123 59.97591 77.23363 > rowSd(tmp5,na.rm=TRUE) [1] 89.347191 10.206399 9.862008 NA 9.914060 9.182240 9.217119 [8] 8.659748 7.744411 8.788266 > rowMax(tmp5,na.rm=TRUE) [1] 469.35921 87.76291 91.54442 NA 88.66960 89.37086 91.65110 [8] 86.18076 83.74694 81.09533 > rowMin(tmp5,na.rm=TRUE) [1] 53.45106 55.06465 60.58719 NA 58.34940 54.93287 57.53123 57.09440 [9] 54.20900 55.15909 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.56656 69.26926 70.75674 69.86828 73.56111 71.59295 69.18587 [8] 76.18345 NaN 73.37551 72.45713 68.62111 72.57705 71.85363 [15] 69.45099 71.13406 69.65103 69.51820 71.54184 67.90769 > colSums(tmp5,na.rm=TRUE) [1] 1013.0990 623.4234 636.8107 628.8145 662.0500 644.3365 622.6728 [8] 685.6511 0.0000 660.3796 652.1142 617.5900 653.1934 646.6827 [15] 625.0589 640.2065 626.8592 625.6638 643.8765 611.1692 > colVars(tmp5,na.rm=TRUE) [1] 17964.68366 78.00451 84.63155 71.14530 49.59742 134.11817 [7] 92.42266 142.46103 NA 75.79166 119.12835 49.63219 [13] 110.92961 105.02650 72.60957 81.03282 54.58411 92.17976 [19] 117.29197 92.05155 > colSd(tmp5,na.rm=TRUE) [1] 134.032398 8.832016 9.199541 8.434767 7.042543 11.580940 [7] 9.613670 11.935704 NA 8.705841 10.914593 7.045012 [13] 10.532313 10.248244 8.521125 9.001823 7.388106 9.601029 [19] 10.830142 9.594350 > colMax(tmp5,na.rm=TRUE) [1] 469.35921 89.37086 81.81922 78.64955 82.80119 89.28395 83.74694 [8] 91.65110 -Inf 86.49179 90.92814 79.64716 88.66960 90.21128 [15] 84.49536 86.73892 85.69225 86.18076 85.56293 86.87253 > colMin(tmp5,na.rm=TRUE) [1] 54.20900 59.57720 55.15909 57.53123 60.58719 55.17220 57.69188 60.50714 [9] Inf 62.65011 62.73370 60.21093 58.52316 60.35137 53.45106 55.06465 [17] 61.98159 55.77857 57.16874 54.93287 > > > > > 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] 225.0835 122.7968 242.6389 200.9363 184.9891 276.1147 323.6804 139.8968 [9] 285.0996 146.0327 > apply(copymatrix,1,var,na.rm=TRUE) [1] 225.0835 122.7968 242.6389 200.9363 184.9891 276.1147 323.6804 139.8968 [9] 285.0996 146.0327 > > > > 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] 0.000000e+00 -5.684342e-14 5.684342e-14 8.526513e-14 0.000000e+00 [6] 2.842171e-14 -2.131628e-13 5.684342e-14 1.989520e-13 -1.989520e-13 [11] -5.684342e-14 -1.136868e-13 1.136868e-13 2.842171e-14 -5.684342e-14 [16] 8.526513e-14 -2.842171e-14 0.000000e+00 0.000000e+00 0.000000e+00 > > > > > > > > > > > ## 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) + } 9 7 10 2 2 7 5 20 8 2 5 7 7 10 3 7 1 8 2 18 1 11 3 13 3 12 8 3 1 7 8 5 1 16 1 2 8 1 5 13 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.091307 > Min(tmp) [1] -2.335145 > mean(tmp) [1] 0.08556812 > Sum(tmp) [1] 8.556812 > Var(tmp) [1] 0.9711151 > > rowMeans(tmp) [1] 0.08556812 > rowSums(tmp) [1] 8.556812 > rowVars(tmp) [1] 0.9711151 > rowSd(tmp) [1] 0.9854517 > rowMax(tmp) [1] 2.091307 > rowMin(tmp) [1] -2.335145 > > colMeans(tmp) [1] -0.372614956 -1.263690643 -0.136334601 -0.096549893 -0.805254742 [6] -0.146097243 -0.977095741 -0.976668724 1.099880819 0.481083516 [11] 0.494760416 -0.191335032 0.894446476 -0.983412384 -2.242338792 [16] -0.205630169 -2.079047725 1.159936117 0.245688711 -1.455523074 [21] 1.777420197 -0.298557734 1.285180862 1.166086903 0.629510478 [26] -1.343806847 -0.855297216 -0.498445635 0.165738662 0.946565882 [31] 0.496137405 -0.962627892 -0.877231634 -0.279234096 0.939244860 [36] 2.091307474 -1.720495484 -0.338692141 -0.707409729 0.717166409 [41] -0.219605025 0.663781872 -0.424447414 -0.503895673 1.865769317 [46] 1.210828221 1.513390576 0.242345603 1.051134567 -0.147107984 [51] -0.351384863 -1.776469989 0.744461981 -0.112652357 -0.688326091 [56] 0.330399326 0.071859175 0.768431795 0.885767530 -0.599902842 [61] 0.041905808 -0.940079792 0.851762435 0.228014405 0.856681596 [66] 0.926175150 1.448468179 0.881932660 1.316251649 0.814347194 [71] 0.837240306 1.602944200 0.759161482 -1.010343695 -1.004554937 [76] -1.409613957 0.078906946 -0.486120179 0.713632711 0.645612970 [81] -0.077043289 0.437972115 0.003460542 -0.620705452 -0.578087547 [86] 1.560682295 -2.335145333 0.574875276 -1.029921357 0.531251409 [91] 1.539276478 -0.149647838 -0.892842447 1.382733613 1.624592198 [96] 0.061622616 0.202181130 1.369200442 -0.914255636 -0.586852687 > colSums(tmp) [1] -0.372614956 -1.263690643 -0.136334601 -0.096549893 -0.805254742 [6] -0.146097243 -0.977095741 -0.976668724 1.099880819 0.481083516 [11] 0.494760416 -0.191335032 0.894446476 -0.983412384 -2.242338792 [16] -0.205630169 -2.079047725 1.159936117 0.245688711 -1.455523074 [21] 1.777420197 -0.298557734 1.285180862 1.166086903 0.629510478 [26] -1.343806847 -0.855297216 -0.498445635 0.165738662 0.946565882 [31] 0.496137405 -0.962627892 -0.877231634 -0.279234096 0.939244860 [36] 2.091307474 -1.720495484 -0.338692141 -0.707409729 0.717166409 [41] -0.219605025 0.663781872 -0.424447414 -0.503895673 1.865769317 [46] 1.210828221 1.513390576 0.242345603 1.051134567 -0.147107984 [51] -0.351384863 -1.776469989 0.744461981 -0.112652357 -0.688326091 [56] 0.330399326 0.071859175 0.768431795 0.885767530 -0.599902842 [61] 0.041905808 -0.940079792 0.851762435 0.228014405 0.856681596 [66] 0.926175150 1.448468179 0.881932660 1.316251649 0.814347194 [71] 0.837240306 1.602944200 0.759161482 -1.010343695 -1.004554937 [76] -1.409613957 0.078906946 -0.486120179 0.713632711 0.645612970 [81] -0.077043289 0.437972115 0.003460542 -0.620705452 -0.578087547 [86] 1.560682295 -2.335145333 0.574875276 -1.029921357 0.531251409 [91] 1.539276478 -0.149647838 -0.892842447 1.382733613 1.624592198 [96] 0.061622616 0.202181130 1.369200442 -0.914255636 -0.586852687 > 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.372614956 -1.263690643 -0.136334601 -0.096549893 -0.805254742 [6] -0.146097243 -0.977095741 -0.976668724 1.099880819 0.481083516 [11] 0.494760416 -0.191335032 0.894446476 -0.983412384 -2.242338792 [16] -0.205630169 -2.079047725 1.159936117 0.245688711 -1.455523074 [21] 1.777420197 -0.298557734 1.285180862 1.166086903 0.629510478 [26] -1.343806847 -0.855297216 -0.498445635 0.165738662 0.946565882 [31] 0.496137405 -0.962627892 -0.877231634 -0.279234096 0.939244860 [36] 2.091307474 -1.720495484 -0.338692141 -0.707409729 0.717166409 [41] -0.219605025 0.663781872 -0.424447414 -0.503895673 1.865769317 [46] 1.210828221 1.513390576 0.242345603 1.051134567 -0.147107984 [51] -0.351384863 -1.776469989 0.744461981 -0.112652357 -0.688326091 [56] 0.330399326 0.071859175 0.768431795 0.885767530 -0.599902842 [61] 0.041905808 -0.940079792 0.851762435 0.228014405 0.856681596 [66] 0.926175150 1.448468179 0.881932660 1.316251649 0.814347194 [71] 0.837240306 1.602944200 0.759161482 -1.010343695 -1.004554937 [76] -1.409613957 0.078906946 -0.486120179 0.713632711 0.645612970 [81] -0.077043289 0.437972115 0.003460542 -0.620705452 -0.578087547 [86] 1.560682295 -2.335145333 0.574875276 -1.029921357 0.531251409 [91] 1.539276478 -0.149647838 -0.892842447 1.382733613 1.624592198 [96] 0.061622616 0.202181130 1.369200442 -0.914255636 -0.586852687 > colMin(tmp) [1] -0.372614956 -1.263690643 -0.136334601 -0.096549893 -0.805254742 [6] -0.146097243 -0.977095741 -0.976668724 1.099880819 0.481083516 [11] 0.494760416 -0.191335032 0.894446476 -0.983412384 -2.242338792 [16] -0.205630169 -2.079047725 1.159936117 0.245688711 -1.455523074 [21] 1.777420197 -0.298557734 1.285180862 1.166086903 0.629510478 [26] -1.343806847 -0.855297216 -0.498445635 0.165738662 0.946565882 [31] 0.496137405 -0.962627892 -0.877231634 -0.279234096 0.939244860 [36] 2.091307474 -1.720495484 -0.338692141 -0.707409729 0.717166409 [41] -0.219605025 0.663781872 -0.424447414 -0.503895673 1.865769317 [46] 1.210828221 1.513390576 0.242345603 1.051134567 -0.147107984 [51] -0.351384863 -1.776469989 0.744461981 -0.112652357 -0.688326091 [56] 0.330399326 0.071859175 0.768431795 0.885767530 -0.599902842 [61] 0.041905808 -0.940079792 0.851762435 0.228014405 0.856681596 [66] 0.926175150 1.448468179 0.881932660 1.316251649 0.814347194 [71] 0.837240306 1.602944200 0.759161482 -1.010343695 -1.004554937 [76] -1.409613957 0.078906946 -0.486120179 0.713632711 0.645612970 [81] -0.077043289 0.437972115 0.003460542 -0.620705452 -0.578087547 [86] 1.560682295 -2.335145333 0.574875276 -1.029921357 0.531251409 [91] 1.539276478 -0.149647838 -0.892842447 1.382733613 1.624592198 [96] 0.061622616 0.202181130 1.369200442 -0.914255636 -0.586852687 > colMedians(tmp) [1] -0.372614956 -1.263690643 -0.136334601 -0.096549893 -0.805254742 [6] -0.146097243 -0.977095741 -0.976668724 1.099880819 0.481083516 [11] 0.494760416 -0.191335032 0.894446476 -0.983412384 -2.242338792 [16] -0.205630169 -2.079047725 1.159936117 0.245688711 -1.455523074 [21] 1.777420197 -0.298557734 1.285180862 1.166086903 0.629510478 [26] -1.343806847 -0.855297216 -0.498445635 0.165738662 0.946565882 [31] 0.496137405 -0.962627892 -0.877231634 -0.279234096 0.939244860 [36] 2.091307474 -1.720495484 -0.338692141 -0.707409729 0.717166409 [41] -0.219605025 0.663781872 -0.424447414 -0.503895673 1.865769317 [46] 1.210828221 1.513390576 0.242345603 1.051134567 -0.147107984 [51] -0.351384863 -1.776469989 0.744461981 -0.112652357 -0.688326091 [56] 0.330399326 0.071859175 0.768431795 0.885767530 -0.599902842 [61] 0.041905808 -0.940079792 0.851762435 0.228014405 0.856681596 [66] 0.926175150 1.448468179 0.881932660 1.316251649 0.814347194 [71] 0.837240306 1.602944200 0.759161482 -1.010343695 -1.004554937 [76] -1.409613957 0.078906946 -0.486120179 0.713632711 0.645612970 [81] -0.077043289 0.437972115 0.003460542 -0.620705452 -0.578087547 [86] 1.560682295 -2.335145333 0.574875276 -1.029921357 0.531251409 [91] 1.539276478 -0.149647838 -0.892842447 1.382733613 1.624592198 [96] 0.061622616 0.202181130 1.369200442 -0.914255636 -0.586852687 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.372615 -1.263691 -0.1363346 -0.09654989 -0.8052547 -0.1460972 [2,] -0.372615 -1.263691 -0.1363346 -0.09654989 -0.8052547 -0.1460972 [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -0.9770957 -0.9766687 1.099881 0.4810835 0.4947604 -0.191335 0.8944465 [2,] -0.9770957 -0.9766687 1.099881 0.4810835 0.4947604 -0.191335 0.8944465 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] -0.9834124 -2.242339 -0.2056302 -2.079048 1.159936 0.2456887 -1.455523 [2,] -0.9834124 -2.242339 -0.2056302 -2.079048 1.159936 0.2456887 -1.455523 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 1.77742 -0.2985577 1.285181 1.166087 0.6295105 -1.343807 -0.8552972 [2,] 1.77742 -0.2985577 1.285181 1.166087 0.6295105 -1.343807 -0.8552972 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [1,] -0.4984456 0.1657387 0.9465659 0.4961374 -0.9626279 -0.8772316 -0.2792341 [2,] -0.4984456 0.1657387 0.9465659 0.4961374 -0.9626279 -0.8772316 -0.2792341 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] 0.9392449 2.091307 -1.720495 -0.3386921 -0.7074097 0.7171664 -0.219605 [2,] 0.9392449 2.091307 -1.720495 -0.3386921 -0.7074097 0.7171664 -0.219605 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] 0.6637819 -0.4244474 -0.5038957 1.865769 1.210828 1.513391 0.2423456 [2,] 0.6637819 -0.4244474 -0.5038957 1.865769 1.210828 1.513391 0.2423456 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] 1.051135 -0.147108 -0.3513849 -1.77647 0.744462 -0.1126524 -0.6883261 [2,] 1.051135 -0.147108 -0.3513849 -1.77647 0.744462 -0.1126524 -0.6883261 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.3303993 0.07185918 0.7684318 0.8857675 -0.5999028 0.04190581 -0.9400798 [2,] 0.3303993 0.07185918 0.7684318 0.8857675 -0.5999028 0.04190581 -0.9400798 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] 0.8517624 0.2280144 0.8566816 0.9261751 1.448468 0.8819327 1.316252 [2,] 0.8517624 0.2280144 0.8566816 0.9261751 1.448468 0.8819327 1.316252 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.8143472 0.8372403 1.602944 0.7591615 -1.010344 -1.004555 -1.409614 [2,] 0.8143472 0.8372403 1.602944 0.7591615 -1.010344 -1.004555 -1.409614 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] 0.07890695 -0.4861202 0.7136327 0.645613 -0.07704329 0.4379721 0.003460542 [2,] 0.07890695 -0.4861202 0.7136327 0.645613 -0.07704329 0.4379721 0.003460542 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] -0.6207055 -0.5780875 1.560682 -2.335145 0.5748753 -1.029921 0.5312514 [2,] -0.6207055 -0.5780875 1.560682 -2.335145 0.5748753 -1.029921 0.5312514 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 1.539276 -0.1496478 -0.8928424 1.382734 1.624592 0.06162262 0.2021811 [2,] 1.539276 -0.1496478 -0.8928424 1.382734 1.624592 0.06162262 0.2021811 [,98] [,99] [,100] [1,] 1.3692 -0.9142556 -0.5868527 [2,] 1.3692 -0.9142556 -0.5868527 > > > Max(tmp2) [1] 1.864887 > Min(tmp2) [1] -2.15836 > mean(tmp2) [1] -0.06543583 > Sum(tmp2) [1] -6.543583 > Var(tmp2) [1] 0.8927122 > > rowMeans(tmp2) [1] 0.12618406 0.09759166 -1.02833570 -2.15835952 -0.79774145 1.51399777 [7] -0.66397046 0.46283384 -0.04423217 -1.12566733 -0.65571064 1.25504535 [13] 1.49130031 0.82432191 -1.61251166 -0.94265932 1.27827211 -0.29565510 [19] 0.68280915 -1.75617201 -0.16444868 -0.11256474 1.60475169 1.15975064 [25] 0.09842415 -0.69377700 0.73314124 0.17158040 0.35542465 -0.90774437 [31] 0.13534643 -0.49991189 0.93891529 0.07982266 -0.31470993 1.38274420 [37] 0.76380614 -0.55645015 0.67556704 1.37966055 1.37871911 -0.42893012 [43] 0.93031422 -0.95939299 -0.53394710 1.10943382 -1.30072495 -0.97555010 [49] -1.45480157 -0.88274070 -0.34528206 0.10583674 0.94421649 0.01166735 [55] -1.06423301 0.63939023 -0.92688125 -0.50818987 0.80474040 -1.62359267 [61] 0.28938794 0.46897313 1.08087921 -0.03262487 -1.13397458 -1.83170703 [67] -1.39067347 -0.37372157 0.46375065 -0.06059442 -0.98330224 -0.70304459 [73] 1.01382985 -1.02343533 -0.05039762 0.11698888 -0.81107032 -1.18612296 [79] 0.29585822 -0.83552944 -0.24520912 -1.01959253 1.68249383 0.87969413 [85] 1.32315547 -1.00271797 -0.16568016 0.03434027 -0.58136566 1.86488673 [91] -1.40890233 0.77909007 -0.63066380 -0.98779443 -0.46992134 -0.08027829 [97] 0.06293268 1.22414871 1.50818380 -0.42457334 > rowSums(tmp2) [1] 0.12618406 0.09759166 -1.02833570 -2.15835952 -0.79774145 1.51399777 [7] -0.66397046 0.46283384 -0.04423217 -1.12566733 -0.65571064 1.25504535 [13] 1.49130031 0.82432191 -1.61251166 -0.94265932 1.27827211 -0.29565510 [19] 0.68280915 -1.75617201 -0.16444868 -0.11256474 1.60475169 1.15975064 [25] 0.09842415 -0.69377700 0.73314124 0.17158040 0.35542465 -0.90774437 [31] 0.13534643 -0.49991189 0.93891529 0.07982266 -0.31470993 1.38274420 [37] 0.76380614 -0.55645015 0.67556704 1.37966055 1.37871911 -0.42893012 [43] 0.93031422 -0.95939299 -0.53394710 1.10943382 -1.30072495 -0.97555010 [49] -1.45480157 -0.88274070 -0.34528206 0.10583674 0.94421649 0.01166735 [55] -1.06423301 0.63939023 -0.92688125 -0.50818987 0.80474040 -1.62359267 [61] 0.28938794 0.46897313 1.08087921 -0.03262487 -1.13397458 -1.83170703 [67] -1.39067347 -0.37372157 0.46375065 -0.06059442 -0.98330224 -0.70304459 [73] 1.01382985 -1.02343533 -0.05039762 0.11698888 -0.81107032 -1.18612296 [79] 0.29585822 -0.83552944 -0.24520912 -1.01959253 1.68249383 0.87969413 [85] 1.32315547 -1.00271797 -0.16568016 0.03434027 -0.58136566 1.86488673 [91] -1.40890233 0.77909007 -0.63066380 -0.98779443 -0.46992134 -0.08027829 [97] 0.06293268 1.22414871 1.50818380 -0.42457334 > 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.12618406 0.09759166 -1.02833570 -2.15835952 -0.79774145 1.51399777 [7] -0.66397046 0.46283384 -0.04423217 -1.12566733 -0.65571064 1.25504535 [13] 1.49130031 0.82432191 -1.61251166 -0.94265932 1.27827211 -0.29565510 [19] 0.68280915 -1.75617201 -0.16444868 -0.11256474 1.60475169 1.15975064 [25] 0.09842415 -0.69377700 0.73314124 0.17158040 0.35542465 -0.90774437 [31] 0.13534643 -0.49991189 0.93891529 0.07982266 -0.31470993 1.38274420 [37] 0.76380614 -0.55645015 0.67556704 1.37966055 1.37871911 -0.42893012 [43] 0.93031422 -0.95939299 -0.53394710 1.10943382 -1.30072495 -0.97555010 [49] -1.45480157 -0.88274070 -0.34528206 0.10583674 0.94421649 0.01166735 [55] -1.06423301 0.63939023 -0.92688125 -0.50818987 0.80474040 -1.62359267 [61] 0.28938794 0.46897313 1.08087921 -0.03262487 -1.13397458 -1.83170703 [67] -1.39067347 -0.37372157 0.46375065 -0.06059442 -0.98330224 -0.70304459 [73] 1.01382985 -1.02343533 -0.05039762 0.11698888 -0.81107032 -1.18612296 [79] 0.29585822 -0.83552944 -0.24520912 -1.01959253 1.68249383 0.87969413 [85] 1.32315547 -1.00271797 -0.16568016 0.03434027 -0.58136566 1.86488673 [91] -1.40890233 0.77909007 -0.63066380 -0.98779443 -0.46992134 -0.08027829 [97] 0.06293268 1.22414871 1.50818380 -0.42457334 > rowMin(tmp2) [1] 0.12618406 0.09759166 -1.02833570 -2.15835952 -0.79774145 1.51399777 [7] -0.66397046 0.46283384 -0.04423217 -1.12566733 -0.65571064 1.25504535 [13] 1.49130031 0.82432191 -1.61251166 -0.94265932 1.27827211 -0.29565510 [19] 0.68280915 -1.75617201 -0.16444868 -0.11256474 1.60475169 1.15975064 [25] 0.09842415 -0.69377700 0.73314124 0.17158040 0.35542465 -0.90774437 [31] 0.13534643 -0.49991189 0.93891529 0.07982266 -0.31470993 1.38274420 [37] 0.76380614 -0.55645015 0.67556704 1.37966055 1.37871911 -0.42893012 [43] 0.93031422 -0.95939299 -0.53394710 1.10943382 -1.30072495 -0.97555010 [49] -1.45480157 -0.88274070 -0.34528206 0.10583674 0.94421649 0.01166735 [55] -1.06423301 0.63939023 -0.92688125 -0.50818987 0.80474040 -1.62359267 [61] 0.28938794 0.46897313 1.08087921 -0.03262487 -1.13397458 -1.83170703 [67] -1.39067347 -0.37372157 0.46375065 -0.06059442 -0.98330224 -0.70304459 [73] 1.01382985 -1.02343533 -0.05039762 0.11698888 -0.81107032 -1.18612296 [79] 0.29585822 -0.83552944 -0.24520912 -1.01959253 1.68249383 0.87969413 [85] 1.32315547 -1.00271797 -0.16568016 0.03434027 -0.58136566 1.86488673 [91] -1.40890233 0.77909007 -0.63066380 -0.98779443 -0.46992134 -0.08027829 [97] 0.06293268 1.22414871 1.50818380 -0.42457334 > > colMeans(tmp2) [1] -0.06543583 > colSums(tmp2) [1] -6.543583 > colVars(tmp2) [1] 0.8927122 > colSd(tmp2) [1] 0.9448345 > colMax(tmp2) [1] 1.864887 > colMin(tmp2) [1] -2.15836 > colMedians(tmp2) [1] -0.07043636 > colRanges(tmp2) [,1] [1,] -2.158360 [2,] 1.864887 > > 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] 4.22684202 3.20085599 -2.04245023 1.44269796 3.88340354 -3.78046807 [7] -0.97272646 -0.06692953 3.19109630 4.26476981 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2827050 [2,] 0.1177915 [3,] 0.6049236 [4,] 0.7958543 [5,] 2.1561294 > > rowApply(tmp,sum) [1] 2.1357487 -0.1111360 1.0959753 -0.5183692 -5.7146576 2.0011124 [7] 4.3611699 0.2697871 3.8261534 6.0013073 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5 4 9 9 2 9 10 7 3 6 [2,] 10 6 6 10 8 10 4 5 2 2 [3,] 1 10 8 3 6 1 7 1 8 5 [4,] 8 3 1 8 10 8 9 2 7 3 [5,] 2 2 5 5 7 3 6 10 10 8 [6,] 9 8 2 1 3 2 2 9 1 1 [7,] 6 1 4 7 9 4 3 4 5 4 [8,] 4 5 7 2 1 5 5 3 6 9 [9,] 3 7 3 6 4 6 8 8 4 7 [10,] 7 9 10 4 5 7 1 6 9 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -5.151765839 -2.175265557 0.280513133 -0.117099215 4.359231649 [6] -1.767344304 1.992808919 -0.593646656 -0.844061527 0.002532662 [11] -0.468605750 1.073669906 5.748200621 -0.152485542 1.730512159 [16] 1.474178421 -1.041666933 -4.283252995 2.003687352 -0.053799552 > colApply(tmp,quantile)[,1] [,1] [1,] -2.166272699 [2,] -1.803237841 [3,] -0.817621347 [4,] -0.369287398 [5,] 0.004653445 > > rowApply(tmp,sum) [1] 3.970802 -2.841393 2.242293 2.607968 -3.963330 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 1 7 4 1 13 [2,] 2 16 5 2 15 [3,] 17 13 9 14 3 [4,] 3 5 17 11 9 [5,] 15 15 20 16 12 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -2.166272699 -0.9510848 1.21450900 -0.9119010 0.9926890 0.005444666 [2,] -0.369287398 0.2285347 0.04938387 -0.4556557 0.1605626 -0.443006486 [3,] -0.817621347 -0.7935709 -0.39960359 1.4225880 2.2597056 -0.326561032 [4,] -1.803237841 -1.2056429 0.72044824 0.2826340 1.1661845 -1.027367821 [5,] 0.004653445 0.5464984 -1.30422439 -0.4547645 -0.2199100 0.024146369 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.03273271 0.002715843 -0.8189918 1.53723071 -0.0163792 -0.8253778 [2,] -0.15364392 -1.310424455 0.3595578 0.01062805 0.6580887 1.6773693 [3,] -0.09497384 -0.559635037 -1.2114480 -1.69748969 0.6535537 -0.4364252 [4,] -0.56262634 1.820343769 0.1907870 0.49140718 -0.2806709 1.5092429 [5,] 1.77132031 -0.546646776 0.6360335 -0.33924359 -1.4831980 -0.8511393 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.6186575 -0.7678666 0.50888811 0.5795722 0.4944237 0.1832979 [2,] 0.7881316 -1.3579967 -0.08735475 -0.2535637 -0.7050770 -1.4755404 [3,] -0.5262897 2.0675283 0.25371081 1.2636116 1.2309823 -1.7389389 [4,] 1.9338610 -0.6610974 -0.51921303 0.8196962 -0.8831204 -0.9563243 [5,] 1.9338402 0.5669469 1.57448101 -0.9351379 -1.1788755 -0.2957474 [,19] [,20] [1,] 1.43246414 0.8260508 [2,] 0.09097599 -0.2530747 [3,] 1.58970396 0.1034661 [4,] 1.21110218 0.3615620 [5,] -2.32055893 -1.0918039 > > > 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.18-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.18-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.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 541 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-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 1.12053 -1.2301 -0.8759525 -0.555435 -0.1318003 1.781053 1.073629 col8 col9 col10 col11 col12 col13 col14 row1 -0.08297473 -1.972833 0.3004121 -1.045837 0.1077384 -0.9886125 0.9401597 col15 col16 col17 col18 col19 col20 row1 0.2296619 -1.531334 -0.4418692 1.305625 0.3509927 2.276753 > tmp[,"col10"] col10 row1 0.3004121 row2 1.8267917 row3 -1.3288140 row4 -0.5133104 row5 -0.5473917 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 1.1205305 -1.23010041 -0.87595254 -0.5554350093 -0.1318003 1.7810531 row5 0.3836909 -0.02421157 0.04957715 0.0001794647 1.8155829 0.8633408 col7 col8 col9 col10 col11 col12 row1 1.0736289 -0.08297473 -1.972833 0.3004121 -1.0458369 0.1077384 row5 -0.3226717 0.28503959 -1.270119 -0.5473917 -0.1256589 0.5994882 col13 col14 col15 col16 col17 col18 row1 -0.9886125 0.9401597 0.2296619 -1.5313342 -0.4418692 1.3056252 row5 0.5995026 -1.3276136 0.8627006 -0.8159397 -0.5265532 -0.2303145 col19 col20 row1 0.3509927 2.2767533 row5 -0.3333570 0.2594818 > tmp[,c("col6","col20")] col6 col20 row1 1.78105305 2.2767533 row2 -0.04147763 -1.5279149 row3 0.49339955 2.1837633 row4 0.34962564 0.7662626 row5 0.86334083 0.2594818 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.7810531 2.2767533 row5 0.8633408 0.2594818 > > > > > 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 51.79357 50.02992 49.72777 50.03245 49.58473 104.7625 52.04399 49.85708 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.22997 48.8204 50.54433 49.45141 51.65068 50.29527 49.65622 50.49974 col17 col18 col19 col20 row1 48.61034 49.65996 51.50357 104.9606 > tmp[,"col10"] col10 row1 48.82040 row2 29.62314 row3 30.42269 row4 29.93970 row5 49.23542 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.79357 50.02992 49.72777 50.03245 49.58473 104.7625 52.04399 49.85708 row5 51.10847 49.39664 51.53222 50.31795 51.51024 105.2397 48.91782 50.59863 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.22997 48.82040 50.54433 49.45141 51.65068 50.29527 49.65622 50.49974 row5 51.76289 49.23542 48.14328 50.66464 49.98205 47.82684 48.87379 48.44416 col17 col18 col19 col20 row1 48.61034 49.65996 51.50357 104.9606 row5 49.01779 48.61142 51.18763 103.3963 > tmp[,c("col6","col20")] col6 col20 row1 104.76252 104.96058 row2 74.63768 75.90959 row3 75.13621 74.30032 row4 74.97392 75.47814 row5 105.23972 103.39629 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7625 104.9606 row5 105.2397 103.3963 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7625 104.9606 row5 105.2397 103.3963 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.2392956 [2,] 0.5622211 [3,] -0.7826683 [4,] 0.2536283 [5,] 2.1367684 > tmp[,c("col17","col7")] col17 col7 [1,] -0.09765184 -0.5442221 [2,] -0.58779798 0.4272225 [3,] 0.53024808 0.5545717 [4,] -0.96900778 -0.8032372 [5,] -0.81313905 0.1617045 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.3690424 0.01514555 [2,] -0.8686497 -1.01911423 [3,] 1.0162172 -2.64907913 [4,] 0.6351600 -0.49319259 [5,] -0.9203794 0.03516365 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.3690424 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.3690424 [2,] -0.8686497 > > > > 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 1.0779812 0.8212732 -1.5833922 0.09301683 0.9853659 1.6575411 1.9556464 row1 -0.4179567 0.3084765 -0.1422393 0.46647407 0.9092384 -0.7632618 0.3032358 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.9148162 -0.2702862 0.9241481 0.61819196 0.5263186 -1.246730 row1 0.9294193 -0.9619903 -0.1022221 -0.01986313 -0.7743443 -1.411153 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.8076453 0.57090454 -0.4407484 -0.4526469 1.0660702 -0.1659485 2.5323731 row1 -0.4193521 0.04132855 -1.8735298 -1.1743892 0.3595386 -0.2963571 0.8103064 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] row2 0.03642976 -0.7725371 -0.09955897 -0.4049649 0.6437719 -0.09752315 [,7] [,8] [,9] [,10] row2 -0.687506 0.6808094 -0.5203794 -1.286863 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.1598516 1.33836 -1.001513 0.7707389 -0.8051965 -0.6738883 0.2364171 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.9017691 0.01945573 -0.1007198 -0.8228244 0.3214478 -1.565686 -0.22377 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.52991 -0.3904726 -0.3700511 -0.3186611 -0.681247 1.466641 > > > 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: 0x000001e836126890> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc7ebb54ae" [2] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc772b29a6" [3] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc6f934425" [4] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc58121950" [5] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc8b8628a" [6] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc58a2389f" [7] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc2b0a5112" [8] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc9d03707" [9] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc61406467" [10] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc4f2952c" [11] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc477d3df1" [12] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc230c5846" [13] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc1124a54" [14] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc6b177cca" [15] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4bcc20ee93a" > > > ### 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: 0x000001e8375aeb60> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001e8375aeb60> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.18-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001e8375aeb60> > rowMedians(tmp) [1] 0.229126412 -0.060385515 0.421819271 0.350744380 -0.140400732 [6] 0.213033831 -0.267030993 -0.017410375 -0.229855750 -0.256622120 [11] -0.302367920 0.502748480 -0.354376436 0.428442217 -0.486742072 [16] -0.230199742 0.237968543 -0.198995579 0.400707140 -0.321638183 [21] 0.087991591 0.048888943 -0.001905667 -0.487606964 0.321788012 [26] 0.592070497 -0.114241485 -0.045020255 0.110956123 -0.238120412 [31] -0.290349520 -0.172495760 -0.501280182 0.227971294 -0.251497988 [36] 0.063811458 0.219057791 -0.270407430 -0.038877887 0.001554433 [41] 0.401268135 -0.007896511 0.342878757 -0.157619210 -0.332639988 [46] 0.354462632 -0.097868474 0.152120847 -0.193196289 0.118414777 [51] -0.709150895 0.231887018 0.298146929 0.151654652 0.010871178 [56] 0.682856151 0.383455216 -0.155728473 -0.669914028 0.392855601 [61] -0.089693458 -0.489783980 0.582409449 0.786397363 0.247203686 [66] 0.228259921 -0.105354420 -0.153412470 0.536875056 -0.098811968 [71] -0.133902183 -0.386023775 -0.275441072 -0.138656565 0.620937781 [76] 0.504071529 -0.452495936 0.122757795 -0.218740507 -0.464868604 [81] -0.547893359 -0.103258280 0.694564715 0.886115283 -0.432905873 [86] -0.329390578 -0.443765337 0.715105872 0.129923479 0.520565995 [91] -0.127059650 0.189150151 0.098380543 -0.295714200 0.065708333 [96] -0.042091445 -0.230638211 0.043465258 0.447088035 -0.585502263 [101] -0.241583092 0.361226477 0.112836987 -0.014505453 -0.312744277 [106] 0.183228798 0.079198462 -0.154680650 -0.671222813 0.257811349 [111] -0.023252627 0.015873463 -0.109633842 0.061305983 0.748600736 [116] 0.116715808 0.044095517 0.180667859 -0.670309421 -0.245599181 [121] -0.212347085 -0.245109516 0.228590931 -0.287615523 -0.646811413 [126] 0.399980166 -0.046057499 -0.370367966 -0.037749210 -0.070541706 [131] 0.525037796 -0.091832759 0.111809637 -0.419996531 -0.288581371 [136] 0.425446112 -0.526168357 -0.135935250 0.175599503 0.039957271 [141] 0.170126313 -0.125223439 0.051091275 0.195972040 -0.014375121 [146] -0.322532001 0.168296082 0.220064480 -0.228085803 -0.230580368 [151] -0.015209310 0.599927511 -0.470386676 -0.023139672 0.539877689 [156] -0.213213991 0.155770244 0.073512866 0.309143650 0.280808481 [161] 0.135835464 -0.378709585 0.511847497 0.022520078 -0.462699807 [166] -0.329791601 0.264185160 -0.249255365 -0.280846897 -0.215237410 [171] 0.345431218 0.033588170 -0.196612353 0.247033136 0.117276275 [176] -0.125503074 0.093503520 -0.240204340 0.449221670 0.364245643 [181] 0.496325383 -0.105091675 0.530993308 0.614981820 -0.304406483 [186] -0.484597965 0.263306262 0.345618030 -0.064418810 -0.517207091 [191] 0.156713958 -0.095287538 0.391564483 -0.231703398 -0.102985201 [196] 0.490148646 0.191031629 -0.480274143 -0.065314187 0.365774969 [201] -0.231040163 0.385800065 0.002204401 -0.358906580 0.229242373 [206] 0.454447262 -0.239422227 -0.295028544 -0.477480463 -0.015891754 [211] 0.254770561 -0.090771549 0.131589561 -0.048878118 0.123387919 [216] -0.511199511 0.124210810 -0.305420531 0.118838892 0.570072659 [221] -0.142536495 -0.257831370 0.055080607 -0.125833456 -0.451980509 [226] 0.188185222 -0.737998424 -0.241128252 0.432060283 -0.521376669 > > proc.time() user system elapsed 3.54 17.57 32.23
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 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: 0x0000029fd6d47890> > .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: 0x0000029fd6d47890> > .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: 0x0000029fd6d47890> > .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: 0x0000029fd6d47890> > 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: 0x0000029fd6d48070> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d48070> > .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: 0x0000029fd6d48070> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d48070> > .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: 0x0000029fd6d48070> > 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: 0x0000029fd6d47eb0> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d47eb0> > .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: 0x0000029fd6d47eb0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000029fd6d47eb0> > .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: 0x0000029fd6d47eb0> > > .Call("R_bm_RowMode",P) <pointer: 0x0000029fd6d47eb0> > .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: 0x0000029fd6d47eb0> > > .Call("R_bm_ColMode",P) <pointer: 0x0000029fd6d47eb0> > .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: 0x0000029fd6d47eb0> > 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: 0x0000029fd6d47c10> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x0000029fd6d47c10> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d47c10> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d47c10> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile46a041a361c" "BufferedMatrixFile46a07cb132e0" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile46a041a361c" "BufferedMatrixFile46a07cb132e0" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d48150> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d48150> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029fd6d48150> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029fd6d48150> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x0000029fd6d48150> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x0000029fd6d48150> > .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: 0x0000029fd6d47970> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029fd6d47970> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000029fd6d47970> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x0000029fd6d47970> > 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: 0x0000029fd6d48460> > .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: 0x0000029fd6d48460> > rm(P) > > proc.time() user system elapsed 0.26 0.20 0.50
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 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.28 0.04 0.29