Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-07-16 11:40 -0400 (Tue, 16 Jul 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4677 |
palomino6 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4416 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4444 |
kjohnson3 | macOS 13.6.5 Ventura | arm64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4393 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4373 |
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/2243 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.69.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino6 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
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.69.0 |
Command: C:\Users\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=C:\Users\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz |
StartedAt: 2024-07-15 22:19:13 -0400 (Mon, 15 Jul 2024) |
EndedAt: 2024-07-15 22:20:37 -0400 (Mon, 15 Jul 2024) |
EllapsedTime: 83.3 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### C:\Users\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=C:\Users\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.4.1 (2024-06-14 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.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.69.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) 13.2.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 code 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 checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ 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 'C:/Users/biocbuild/bbs-3.20-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found '_exit', possibly from '_exit' (C) 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 ... 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 'C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### C:\Users\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'C:/Users/biocbuild/bbs-3.20-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 13.2.0' gcc -I"C:/Users/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"C:/Users/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/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"C:/Users/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/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"C:/Users/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/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:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib -LC:/Users/biocbuild/bbs-3.20-bioc/R/bin/x64 -lR installing to C:/Users/biocbuild/bbs-3.20-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.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.18 0.14 0.48
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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] "C:/Users/biocbuild/bbs-3.20-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 468464 25.1 1021772 54.6 633391 33.9 Vcells 853911 6.6 8388608 64.0 2003323 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 Jul 15 22:19:42 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 Jul 15 22:19:42 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: 0x0000023a13aff410> > > > > 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 Jul 15 22:19:50 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 Jul 15 22:19:54 2024" > > ColMode(tmp2) <pointer: 0x0000023a13aff410> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.7603800 -0.42769525 0.9151329 0.933332684 [2,] -0.1472176 -0.03897668 -0.7132674 -0.070774313 [3,] 0.4214142 -1.20646697 -0.7237969 0.804079375 [4,] -0.6891184 -1.18752765 -0.8510703 0.001814841 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.7603800 0.42769525 0.9151329 0.933332684 [2,] 0.1472176 0.03897668 0.7132674 0.070774313 [3,] 0.4214142 1.20646697 0.7237969 0.804079375 [4,] 0.6891184 1.18752765 0.8510703 0.001814841 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9880118 0.6539841 0.9566258 0.96609145 [2,] 0.3836894 0.1974251 0.8445516 0.26603442 [3,] 0.6491642 1.0983929 0.8507625 0.89670473 [4,] 0.8301316 1.0897374 0.9225347 0.04260095 > > 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: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.64050 31.96754 35.48139 35.59425 [2,] 28.98411 27.01323 34.15878 27.73112 [3,] 31.91306 37.19040 34.23142 34.77113 [4,] 33.99043 37.08490 35.07642 25.42782 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x0000023a13aff110> > exp(tmp5) <pointer: 0x0000023a13aff110> > log(tmp5,2) <pointer: 0x0000023a13aff110> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.5598 > Min(tmp5) [1] 52.75442 > mean(tmp5) [1] 72.86771 > Sum(tmp5) [1] 14573.54 > Var(tmp5) [1] 853.2767 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.61464 69.86314 70.38953 71.29726 72.00569 70.04373 67.46092 74.22459 [9] 70.73140 72.04614 > rowSums(tmp5) [1] 1812.293 1397.263 1407.791 1425.945 1440.114 1400.875 1349.218 1484.492 [9] 1414.628 1440.923 > rowVars(tmp5) [1] 7931.72542 89.34883 60.87379 59.91433 80.65861 69.14709 [7] 49.88855 59.78150 54.85911 83.25872 > rowSd(tmp5) [1] 89.060235 9.452451 7.802166 7.740435 8.981014 8.315473 7.063183 [8] 7.731850 7.406693 9.124622 > rowMax(tmp5) [1] 467.55976 89.05723 88.27743 88.09924 90.12701 84.92653 82.16404 [8] 87.57128 87.48305 89.11232 > rowMin(tmp5) [1] 60.93892 52.75442 60.62096 52.92468 58.86926 57.98041 56.55799 58.21084 [9] 55.17712 57.57180 > > colMeans(tmp5) [1] 108.18430 70.98420 73.47654 69.63787 70.70919 68.96730 71.56937 [8] 69.49886 72.52095 72.17041 67.07620 72.70170 72.68780 71.52658 [15] 74.23785 70.64826 74.61516 70.36012 68.45789 67.32355 > colSums(tmp5) [1] 1081.8430 709.8420 734.7654 696.3787 707.0919 689.6730 715.6937 [8] 694.9886 725.2095 721.7041 670.7620 727.0170 726.8780 715.2658 [15] 742.3785 706.4826 746.1516 703.6012 684.5789 673.2355 > colVars(tmp5) [1] 15994.42513 73.87093 65.22216 89.38685 64.22060 20.14725 [7] 85.39917 31.97612 82.04729 74.44343 40.56306 105.23301 [13] 71.74130 18.76374 113.06523 39.70489 75.49901 91.75310 [19] 155.82191 21.55084 > colSd(tmp5) [1] 126.469068 8.594820 8.076024 9.454462 8.013775 4.488569 [7] 9.241167 5.654743 9.057996 8.628060 6.368913 10.258314 [13] 8.470023 4.331713 10.633213 6.301182 8.689017 9.578784 [19] 12.482865 4.642288 > colMax(tmp5) [1] 467.55976 81.43902 90.12701 82.10961 84.92653 74.98054 89.11232 [8] 80.10040 87.48305 89.05723 79.00889 89.63834 87.55791 77.65590 [15] 88.27743 77.44214 85.50319 85.54411 88.09924 74.88834 > colMin(tmp5) [1] 58.86926 56.22449 62.01558 52.92468 57.90700 60.33348 56.55799 61.28842 [9] 60.93892 63.41141 58.99589 57.98041 57.57180 63.86526 61.71738 58.21084 [17] 60.14628 55.17712 52.75442 61.38735 > > > ### 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] 90.61464 69.86314 70.38953 NA 72.00569 70.04373 67.46092 74.22459 [9] 70.73140 72.04614 > rowSums(tmp5) [1] 1812.293 1397.263 1407.791 NA 1440.114 1400.875 1349.218 1484.492 [9] 1414.628 1440.923 > rowVars(tmp5) [1] 7931.72542 89.34883 60.87379 62.34631 80.65861 69.14709 [7] 49.88855 59.78150 54.85911 83.25872 > rowSd(tmp5) [1] 89.060235 9.452451 7.802166 7.895968 8.981014 8.315473 7.063183 [8] 7.731850 7.406693 9.124622 > rowMax(tmp5) [1] 467.55976 89.05723 88.27743 NA 90.12701 84.92653 82.16404 [8] 87.57128 87.48305 89.11232 > rowMin(tmp5) [1] 60.93892 52.75442 60.62096 NA 58.86926 57.98041 56.55799 58.21084 [9] 55.17712 57.57180 > > colMeans(tmp5) [1] 108.18430 70.98420 73.47654 69.63787 70.70919 68.96730 71.56937 [8] 69.49886 72.52095 72.17041 67.07620 72.70170 72.68780 NA [15] 74.23785 70.64826 74.61516 70.36012 68.45789 67.32355 > colSums(tmp5) [1] 1081.8430 709.8420 734.7654 696.3787 707.0919 689.6730 715.6937 [8] 694.9886 725.2095 721.7041 670.7620 727.0170 726.8780 NA [15] 742.3785 706.4826 746.1516 703.6012 684.5789 673.2355 > colVars(tmp5) [1] 15994.42513 73.87093 65.22216 89.38685 64.22060 20.14725 [7] 85.39917 31.97612 82.04729 74.44343 40.56306 105.23301 [13] 71.74130 NA 113.06523 39.70489 75.49901 91.75310 [19] 155.82191 21.55084 > colSd(tmp5) [1] 126.469068 8.594820 8.076024 9.454462 8.013775 4.488569 [7] 9.241167 5.654743 9.057996 8.628060 6.368913 10.258314 [13] 8.470023 NA 10.633213 6.301182 8.689017 9.578784 [19] 12.482865 4.642288 > colMax(tmp5) [1] 467.55976 81.43902 90.12701 82.10961 84.92653 74.98054 89.11232 [8] 80.10040 87.48305 89.05723 79.00889 89.63834 87.55791 NA [15] 88.27743 77.44214 85.50319 85.54411 88.09924 74.88834 > colMin(tmp5) [1] 58.86926 56.22449 62.01558 52.92468 57.90700 60.33348 56.55799 61.28842 [9] 60.93892 63.41141 58.99589 57.98041 57.57180 NA 61.71738 58.21084 [17] 60.14628 55.17712 52.75442 61.38735 > > Max(tmp5,na.rm=TRUE) [1] 467.5598 > Min(tmp5,na.rm=TRUE) [1] 52.75442 > mean(tmp5,na.rm=TRUE) [1] 72.85592 > Sum(tmp5,na.rm=TRUE) [1] 14498.33 > Var(tmp5,na.rm=TRUE) [1] 857.5582 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.61464 69.86314 70.38953 71.09118 72.00569 70.04373 67.46092 74.22459 [9] 70.73140 72.04614 > rowSums(tmp5,na.rm=TRUE) [1] 1812.293 1397.263 1407.791 1350.732 1440.114 1400.875 1349.218 1484.492 [9] 1414.628 1440.923 > rowVars(tmp5,na.rm=TRUE) [1] 7931.72542 89.34883 60.87379 62.34631 80.65861 69.14709 [7] 49.88855 59.78150 54.85911 83.25872 > rowSd(tmp5,na.rm=TRUE) [1] 89.060235 9.452451 7.802166 7.895968 8.981014 8.315473 7.063183 [8] 7.731850 7.406693 9.124622 > rowMax(tmp5,na.rm=TRUE) [1] 467.55976 89.05723 88.27743 88.09924 90.12701 84.92653 82.16404 [8] 87.57128 87.48305 89.11232 > rowMin(tmp5,na.rm=TRUE) [1] 60.93892 52.75442 60.62096 52.92468 58.86926 57.98041 56.55799 58.21084 [9] 55.17712 57.57180 > > colMeans(tmp5,na.rm=TRUE) [1] 108.18430 70.98420 73.47654 69.63787 70.70919 68.96730 71.56937 [8] 69.49886 72.52095 72.17041 67.07620 72.70170 72.68780 71.11699 [15] 74.23785 70.64826 74.61516 70.36012 68.45789 67.32355 > colSums(tmp5,na.rm=TRUE) [1] 1081.8430 709.8420 734.7654 696.3787 707.0919 689.6730 715.6937 [8] 694.9886 725.2095 721.7041 670.7620 727.0170 726.8780 640.0529 [15] 742.3785 706.4826 746.1516 703.6012 684.5789 673.2355 > colVars(tmp5,na.rm=TRUE) [1] 15994.42513 73.87093 65.22216 89.38685 64.22060 20.14725 [7] 85.39917 31.97612 82.04729 74.44343 40.56306 105.23301 [13] 71.74130 19.22191 113.06523 39.70489 75.49901 91.75310 [19] 155.82191 21.55084 > colSd(tmp5,na.rm=TRUE) [1] 126.469068 8.594820 8.076024 9.454462 8.013775 4.488569 [7] 9.241167 5.654743 9.057996 8.628060 6.368913 10.258314 [13] 8.470023 4.384280 10.633213 6.301182 8.689017 9.578784 [19] 12.482865 4.642288 > colMax(tmp5,na.rm=TRUE) [1] 467.55976 81.43902 90.12701 82.10961 84.92653 74.98054 89.11232 [8] 80.10040 87.48305 89.05723 79.00889 89.63834 87.55791 77.65590 [15] 88.27743 77.44214 85.50319 85.54411 88.09924 74.88834 > colMin(tmp5,na.rm=TRUE) [1] 58.86926 56.22449 62.01558 52.92468 57.90700 60.33348 56.55799 61.28842 [9] 60.93892 63.41141 58.99589 57.98041 57.57180 63.86526 61.71738 58.21084 [17] 60.14628 55.17712 52.75442 61.38735 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.61464 69.86314 70.38953 NaN 72.00569 70.04373 67.46092 74.22459 [9] 70.73140 72.04614 > rowSums(tmp5,na.rm=TRUE) [1] 1812.293 1397.263 1407.791 0.000 1440.114 1400.875 1349.218 1484.492 [9] 1414.628 1440.923 > rowVars(tmp5,na.rm=TRUE) [1] 7931.72542 89.34883 60.87379 NA 80.65861 69.14709 [7] 49.88855 59.78150 54.85911 83.25872 > rowSd(tmp5,na.rm=TRUE) [1] 89.060235 9.452451 7.802166 NA 8.981014 8.315473 7.063183 [8] 7.731850 7.406693 9.124622 > rowMax(tmp5,na.rm=TRUE) [1] 467.55976 89.05723 88.27743 NA 90.12701 84.92653 82.16404 [8] 87.57128 87.48305 89.11232 > rowMin(tmp5,na.rm=TRUE) [1] 60.93892 52.75442 60.62096 NA 58.86926 57.98041 56.55799 58.21084 [9] 55.17712 57.57180 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.34404 70.29496 73.52871 71.49490 71.06270 69.33889 71.69034 [8] 69.07945 73.00130 73.14364 67.97402 72.60753 72.22222 NaN [15] 73.70467 70.72858 75.01363 69.19389 66.27552 67.02801 > colSums(tmp5,na.rm=TRUE) [1] 1011.0964 632.6546 661.7584 643.4541 639.5643 624.0500 645.2130 [8] 621.7151 657.0117 658.2927 611.7661 653.4678 650.0000 0.0000 [15] 663.3420 636.5573 675.1226 622.7450 596.4796 603.2521 > colVars(tmp5,na.rm=TRUE) [1] 17799.06455 77.76045 73.34431 61.76428 70.84231 21.11225 [7] 95.90944 33.99420 89.70739 73.09329 36.56518 118.28737 [13] 78.27038 NA 124.00015 44.59542 83.15013 87.92123 [19] 121.71869 23.26211 > colSd(tmp5,na.rm=TRUE) [1] 133.413135 8.818189 8.564129 7.859025 8.416788 4.594807 [7] 9.793337 5.830454 9.471398 8.549461 6.046915 10.876000 [13] 8.847055 NA 11.135536 6.677980 9.118669 9.376632 [19] 11.032620 4.823081 > colMax(tmp5,na.rm=TRUE) [1] 467.55976 81.43902 90.12701 82.10961 84.92653 74.98054 89.11232 [8] 80.10040 87.48305 89.05723 79.00889 89.63834 87.55791 -Inf [15] 88.27743 77.44214 85.50319 85.54411 87.57128 74.88834 > colMin(tmp5,na.rm=TRUE) [1] 58.86926 56.22449 62.01558 57.71869 57.90700 60.33348 56.55799 61.28842 [9] 60.93892 64.06194 60.62096 57.98041 57.57180 Inf 61.71738 58.21084 [17] 60.14628 55.17712 52.75442 61.38735 > > > > > 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] 327.5596 365.7311 265.0481 316.7889 232.7196 268.8189 255.7220 278.2360 [9] 165.9244 197.3188 > apply(copymatrix,1,var,na.rm=TRUE) [1] 327.5596 365.7311 265.0481 316.7889 232.7196 268.8189 255.7220 278.2360 [9] 165.9244 197.3188 > > > > 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] -5.684342e-14 -2.842171e-14 -5.684342e-14 1.278977e-13 4.263256e-14 [6] 5.684342e-14 2.842171e-14 -2.557954e-13 -1.136868e-13 -5.684342e-14 [11] 5.684342e-14 2.842171e-14 5.684342e-14 0.000000e+00 -1.136868e-13 [16] 2.842171e-14 -8.526513e-14 -8.526513e-14 1.136868e-13 8.526513e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 3 7 1 2 7 9 2 4 5 10 9 15 4 9 3 1 10 7 10 14 2 9 7 3 10 9 9 2 5 4 9 12 9 20 5 11 8 10 1 2 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.845469 > Min(tmp) [1] -2.791182 > mean(tmp) [1] 0.01024066 > Sum(tmp) [1] 1.024066 > Var(tmp) [1] 1.135688 > > rowMeans(tmp) [1] 0.01024066 > rowSums(tmp) [1] 1.024066 > rowVars(tmp) [1] 1.135688 > rowSd(tmp) [1] 1.065687 > rowMax(tmp) [1] 2.845469 > rowMin(tmp) [1] -2.791182 > > colMeans(tmp) [1] 0.34972825 0.16576507 0.95574989 0.52777075 1.42549105 2.13780458 [7] -1.58843603 0.07988394 0.27561196 1.07618046 -0.97476917 0.14511746 [13] 2.67461357 -0.49815810 1.86676486 -1.65419063 0.70564483 -1.15020486 [19] -0.60992778 0.30427540 -0.26394312 -0.85837891 0.82564756 1.00826134 [25] 0.04902348 -1.36871116 -0.71507599 0.48150823 0.87540571 -1.47073951 [31] 1.04718687 -0.82301845 0.31258203 1.50251173 0.95572477 -1.20082840 [37] 2.84546874 1.30892877 -0.43376173 0.30052481 -0.25975446 -0.66375506 [43] 0.40568172 -0.17811287 -1.69116782 -0.87148485 -0.58164763 1.23213250 [49] 1.05289482 -0.64418908 -1.38468876 -0.24321161 -0.22778162 1.01237630 [55] -0.13980235 -1.02538093 -0.31032249 -1.83194295 -1.74456044 0.46208811 [61] 0.72865270 -0.15000141 -0.65960653 0.25253946 -1.72438523 0.70843705 [67] -0.88252797 -0.51063047 -0.78154861 -0.48726996 -0.03103325 0.83916868 [73] -1.20055677 -0.18485111 -1.79238289 -0.88861241 0.58462507 -0.22994077 [79] 0.74290162 1.63263088 -2.79118219 -1.26710647 -1.00659077 0.73678228 [85] -1.22592117 -0.01483511 0.16453310 1.53065320 -0.27181573 1.12729626 [91] 0.75923229 2.01936170 1.18799727 0.74154802 -0.85059431 -0.21263498 [97] 0.25704906 -0.03749111 0.82192315 0.42985059 > colSums(tmp) [1] 0.34972825 0.16576507 0.95574989 0.52777075 1.42549105 2.13780458 [7] -1.58843603 0.07988394 0.27561196 1.07618046 -0.97476917 0.14511746 [13] 2.67461357 -0.49815810 1.86676486 -1.65419063 0.70564483 -1.15020486 [19] -0.60992778 0.30427540 -0.26394312 -0.85837891 0.82564756 1.00826134 [25] 0.04902348 -1.36871116 -0.71507599 0.48150823 0.87540571 -1.47073951 [31] 1.04718687 -0.82301845 0.31258203 1.50251173 0.95572477 -1.20082840 [37] 2.84546874 1.30892877 -0.43376173 0.30052481 -0.25975446 -0.66375506 [43] 0.40568172 -0.17811287 -1.69116782 -0.87148485 -0.58164763 1.23213250 [49] 1.05289482 -0.64418908 -1.38468876 -0.24321161 -0.22778162 1.01237630 [55] -0.13980235 -1.02538093 -0.31032249 -1.83194295 -1.74456044 0.46208811 [61] 0.72865270 -0.15000141 -0.65960653 0.25253946 -1.72438523 0.70843705 [67] -0.88252797 -0.51063047 -0.78154861 -0.48726996 -0.03103325 0.83916868 [73] -1.20055677 -0.18485111 -1.79238289 -0.88861241 0.58462507 -0.22994077 [79] 0.74290162 1.63263088 -2.79118219 -1.26710647 -1.00659077 0.73678228 [85] -1.22592117 -0.01483511 0.16453310 1.53065320 -0.27181573 1.12729626 [91] 0.75923229 2.01936170 1.18799727 0.74154802 -0.85059431 -0.21263498 [97] 0.25704906 -0.03749111 0.82192315 0.42985059 > 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.34972825 0.16576507 0.95574989 0.52777075 1.42549105 2.13780458 [7] -1.58843603 0.07988394 0.27561196 1.07618046 -0.97476917 0.14511746 [13] 2.67461357 -0.49815810 1.86676486 -1.65419063 0.70564483 -1.15020486 [19] -0.60992778 0.30427540 -0.26394312 -0.85837891 0.82564756 1.00826134 [25] 0.04902348 -1.36871116 -0.71507599 0.48150823 0.87540571 -1.47073951 [31] 1.04718687 -0.82301845 0.31258203 1.50251173 0.95572477 -1.20082840 [37] 2.84546874 1.30892877 -0.43376173 0.30052481 -0.25975446 -0.66375506 [43] 0.40568172 -0.17811287 -1.69116782 -0.87148485 -0.58164763 1.23213250 [49] 1.05289482 -0.64418908 -1.38468876 -0.24321161 -0.22778162 1.01237630 [55] -0.13980235 -1.02538093 -0.31032249 -1.83194295 -1.74456044 0.46208811 [61] 0.72865270 -0.15000141 -0.65960653 0.25253946 -1.72438523 0.70843705 [67] -0.88252797 -0.51063047 -0.78154861 -0.48726996 -0.03103325 0.83916868 [73] -1.20055677 -0.18485111 -1.79238289 -0.88861241 0.58462507 -0.22994077 [79] 0.74290162 1.63263088 -2.79118219 -1.26710647 -1.00659077 0.73678228 [85] -1.22592117 -0.01483511 0.16453310 1.53065320 -0.27181573 1.12729626 [91] 0.75923229 2.01936170 1.18799727 0.74154802 -0.85059431 -0.21263498 [97] 0.25704906 -0.03749111 0.82192315 0.42985059 > colMin(tmp) [1] 0.34972825 0.16576507 0.95574989 0.52777075 1.42549105 2.13780458 [7] -1.58843603 0.07988394 0.27561196 1.07618046 -0.97476917 0.14511746 [13] 2.67461357 -0.49815810 1.86676486 -1.65419063 0.70564483 -1.15020486 [19] -0.60992778 0.30427540 -0.26394312 -0.85837891 0.82564756 1.00826134 [25] 0.04902348 -1.36871116 -0.71507599 0.48150823 0.87540571 -1.47073951 [31] 1.04718687 -0.82301845 0.31258203 1.50251173 0.95572477 -1.20082840 [37] 2.84546874 1.30892877 -0.43376173 0.30052481 -0.25975446 -0.66375506 [43] 0.40568172 -0.17811287 -1.69116782 -0.87148485 -0.58164763 1.23213250 [49] 1.05289482 -0.64418908 -1.38468876 -0.24321161 -0.22778162 1.01237630 [55] -0.13980235 -1.02538093 -0.31032249 -1.83194295 -1.74456044 0.46208811 [61] 0.72865270 -0.15000141 -0.65960653 0.25253946 -1.72438523 0.70843705 [67] -0.88252797 -0.51063047 -0.78154861 -0.48726996 -0.03103325 0.83916868 [73] -1.20055677 -0.18485111 -1.79238289 -0.88861241 0.58462507 -0.22994077 [79] 0.74290162 1.63263088 -2.79118219 -1.26710647 -1.00659077 0.73678228 [85] -1.22592117 -0.01483511 0.16453310 1.53065320 -0.27181573 1.12729626 [91] 0.75923229 2.01936170 1.18799727 0.74154802 -0.85059431 -0.21263498 [97] 0.25704906 -0.03749111 0.82192315 0.42985059 > colMedians(tmp) [1] 0.34972825 0.16576507 0.95574989 0.52777075 1.42549105 2.13780458 [7] -1.58843603 0.07988394 0.27561196 1.07618046 -0.97476917 0.14511746 [13] 2.67461357 -0.49815810 1.86676486 -1.65419063 0.70564483 -1.15020486 [19] -0.60992778 0.30427540 -0.26394312 -0.85837891 0.82564756 1.00826134 [25] 0.04902348 -1.36871116 -0.71507599 0.48150823 0.87540571 -1.47073951 [31] 1.04718687 -0.82301845 0.31258203 1.50251173 0.95572477 -1.20082840 [37] 2.84546874 1.30892877 -0.43376173 0.30052481 -0.25975446 -0.66375506 [43] 0.40568172 -0.17811287 -1.69116782 -0.87148485 -0.58164763 1.23213250 [49] 1.05289482 -0.64418908 -1.38468876 -0.24321161 -0.22778162 1.01237630 [55] -0.13980235 -1.02538093 -0.31032249 -1.83194295 -1.74456044 0.46208811 [61] 0.72865270 -0.15000141 -0.65960653 0.25253946 -1.72438523 0.70843705 [67] -0.88252797 -0.51063047 -0.78154861 -0.48726996 -0.03103325 0.83916868 [73] -1.20055677 -0.18485111 -1.79238289 -0.88861241 0.58462507 -0.22994077 [79] 0.74290162 1.63263088 -2.79118219 -1.26710647 -1.00659077 0.73678228 [85] -1.22592117 -0.01483511 0.16453310 1.53065320 -0.27181573 1.12729626 [91] 0.75923229 2.01936170 1.18799727 0.74154802 -0.85059431 -0.21263498 [97] 0.25704906 -0.03749111 0.82192315 0.42985059 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.3497282 0.1657651 0.9557499 0.5277708 1.425491 2.137805 -1.588436 [2,] 0.3497282 0.1657651 0.9557499 0.5277708 1.425491 2.137805 -1.588436 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.07988394 0.275612 1.07618 -0.9747692 0.1451175 2.674614 -0.4981581 [2,] 0.07988394 0.275612 1.07618 -0.9747692 0.1451175 2.674614 -0.4981581 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.866765 -1.654191 0.7056448 -1.150205 -0.6099278 0.3042754 -0.2639431 [2,] 1.866765 -1.654191 0.7056448 -1.150205 -0.6099278 0.3042754 -0.2639431 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.8583789 0.8256476 1.008261 0.04902348 -1.368711 -0.715076 0.4815082 [2,] -0.8583789 0.8256476 1.008261 0.04902348 -1.368711 -0.715076 0.4815082 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.8754057 -1.47074 1.047187 -0.8230184 0.312582 1.502512 0.9557248 [2,] 0.8754057 -1.47074 1.047187 -0.8230184 0.312582 1.502512 0.9557248 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.200828 2.845469 1.308929 -0.4337617 0.3005248 -0.2597545 -0.6637551 [2,] -1.200828 2.845469 1.308929 -0.4337617 0.3005248 -0.2597545 -0.6637551 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.4056817 -0.1781129 -1.691168 -0.8714849 -0.5816476 1.232133 1.052895 [2,] 0.4056817 -0.1781129 -1.691168 -0.8714849 -0.5816476 1.232133 1.052895 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.6441891 -1.384689 -0.2432116 -0.2277816 1.012376 -0.1398024 -1.025381 [2,] -0.6441891 -1.384689 -0.2432116 -0.2277816 1.012376 -0.1398024 -1.025381 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.3103225 -1.831943 -1.74456 0.4620881 0.7286527 -0.1500014 -0.6596065 [2,] -0.3103225 -1.831943 -1.74456 0.4620881 0.7286527 -0.1500014 -0.6596065 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.2525395 -1.724385 0.708437 -0.882528 -0.5106305 -0.7815486 -0.48727 [2,] 0.2525395 -1.724385 0.708437 -0.882528 -0.5106305 -0.7815486 -0.48727 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.03103325 0.8391687 -1.200557 -0.1848511 -1.792383 -0.8886124 0.5846251 [2,] -0.03103325 0.8391687 -1.200557 -0.1848511 -1.792383 -0.8886124 0.5846251 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.2299408 0.7429016 1.632631 -2.791182 -1.267106 -1.006591 0.7367823 [2,] -0.2299408 0.7429016 1.632631 -2.791182 -1.267106 -1.006591 0.7367823 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.225921 -0.01483511 0.1645331 1.530653 -0.2718157 1.127296 0.7592323 [2,] -1.225921 -0.01483511 0.1645331 1.530653 -0.2718157 1.127296 0.7592323 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 2.019362 1.187997 0.741548 -0.8505943 -0.212635 0.2570491 -0.03749111 [2,] 2.019362 1.187997 0.741548 -0.8505943 -0.212635 0.2570491 -0.03749111 [,99] [,100] [1,] 0.8219232 0.4298506 [2,] 0.8219232 0.4298506 > > > Max(tmp2) [1] 2.345626 > Min(tmp2) [1] -2.398553 > mean(tmp2) [1] -0.05094707 > Sum(tmp2) [1] -5.094707 > Var(tmp2) [1] 1.00995 > > rowMeans(tmp2) [1] 2.345625897 -0.342558838 -0.093868303 1.182986377 0.367603538 [6] 0.321616807 0.111566326 0.210582437 -0.292564785 -1.125142903 [11] -0.253878289 0.246599710 -1.197388138 0.911853903 -2.398552640 [16] 0.163731265 -0.082039058 0.755131692 0.767982217 -1.393475392 [21] -1.414464923 0.282471651 0.945460404 -0.018838692 -2.055348806 [26] 0.215299481 -0.916456341 -1.312920286 0.573984970 0.253140871 [31] 1.096532576 0.607080785 -1.423950921 -1.528383343 -0.563838643 [36] -0.808467456 0.438454170 1.101736762 -0.756135518 1.295442201 [41] -0.518326652 -0.027269983 0.606457629 1.760022322 0.025922949 [46] 0.881991303 -1.311545453 -1.420519621 1.102910633 0.409552759 [51] 0.999668303 -2.178551392 -1.392394014 0.550429964 1.652603200 [56] 1.287191753 1.019811796 0.205771771 0.084987537 1.051649187 [61] -0.721686571 -0.424711180 -0.846154589 0.366925086 2.042491404 [66] 0.438981002 -1.637315255 -1.464347744 0.793618968 0.092634833 [71] 0.604711447 -0.564005495 -1.380020857 1.200438040 -0.975574696 [76] -1.443518663 0.109052806 -1.087000580 -0.431773808 -1.201686868 [81] 0.036676754 -0.150436080 0.398313970 0.007735541 1.094328357 [86] 1.374188752 -0.654909300 0.456774703 -0.133955027 -0.497379016 [91] 1.093960699 -0.431161640 -1.235047311 0.080792848 0.996197107 [96] -2.042421328 -0.137665487 -0.279548525 -0.669854162 1.120669666 > rowSums(tmp2) [1] 2.345625897 -0.342558838 -0.093868303 1.182986377 0.367603538 [6] 0.321616807 0.111566326 0.210582437 -0.292564785 -1.125142903 [11] -0.253878289 0.246599710 -1.197388138 0.911853903 -2.398552640 [16] 0.163731265 -0.082039058 0.755131692 0.767982217 -1.393475392 [21] -1.414464923 0.282471651 0.945460404 -0.018838692 -2.055348806 [26] 0.215299481 -0.916456341 -1.312920286 0.573984970 0.253140871 [31] 1.096532576 0.607080785 -1.423950921 -1.528383343 -0.563838643 [36] -0.808467456 0.438454170 1.101736762 -0.756135518 1.295442201 [41] -0.518326652 -0.027269983 0.606457629 1.760022322 0.025922949 [46] 0.881991303 -1.311545453 -1.420519621 1.102910633 0.409552759 [51] 0.999668303 -2.178551392 -1.392394014 0.550429964 1.652603200 [56] 1.287191753 1.019811796 0.205771771 0.084987537 1.051649187 [61] -0.721686571 -0.424711180 -0.846154589 0.366925086 2.042491404 [66] 0.438981002 -1.637315255 -1.464347744 0.793618968 0.092634833 [71] 0.604711447 -0.564005495 -1.380020857 1.200438040 -0.975574696 [76] -1.443518663 0.109052806 -1.087000580 -0.431773808 -1.201686868 [81] 0.036676754 -0.150436080 0.398313970 0.007735541 1.094328357 [86] 1.374188752 -0.654909300 0.456774703 -0.133955027 -0.497379016 [91] 1.093960699 -0.431161640 -1.235047311 0.080792848 0.996197107 [96] -2.042421328 -0.137665487 -0.279548525 -0.669854162 1.120669666 > 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] 2.345625897 -0.342558838 -0.093868303 1.182986377 0.367603538 [6] 0.321616807 0.111566326 0.210582437 -0.292564785 -1.125142903 [11] -0.253878289 0.246599710 -1.197388138 0.911853903 -2.398552640 [16] 0.163731265 -0.082039058 0.755131692 0.767982217 -1.393475392 [21] -1.414464923 0.282471651 0.945460404 -0.018838692 -2.055348806 [26] 0.215299481 -0.916456341 -1.312920286 0.573984970 0.253140871 [31] 1.096532576 0.607080785 -1.423950921 -1.528383343 -0.563838643 [36] -0.808467456 0.438454170 1.101736762 -0.756135518 1.295442201 [41] -0.518326652 -0.027269983 0.606457629 1.760022322 0.025922949 [46] 0.881991303 -1.311545453 -1.420519621 1.102910633 0.409552759 [51] 0.999668303 -2.178551392 -1.392394014 0.550429964 1.652603200 [56] 1.287191753 1.019811796 0.205771771 0.084987537 1.051649187 [61] -0.721686571 -0.424711180 -0.846154589 0.366925086 2.042491404 [66] 0.438981002 -1.637315255 -1.464347744 0.793618968 0.092634833 [71] 0.604711447 -0.564005495 -1.380020857 1.200438040 -0.975574696 [76] -1.443518663 0.109052806 -1.087000580 -0.431773808 -1.201686868 [81] 0.036676754 -0.150436080 0.398313970 0.007735541 1.094328357 [86] 1.374188752 -0.654909300 0.456774703 -0.133955027 -0.497379016 [91] 1.093960699 -0.431161640 -1.235047311 0.080792848 0.996197107 [96] -2.042421328 -0.137665487 -0.279548525 -0.669854162 1.120669666 > rowMin(tmp2) [1] 2.345625897 -0.342558838 -0.093868303 1.182986377 0.367603538 [6] 0.321616807 0.111566326 0.210582437 -0.292564785 -1.125142903 [11] -0.253878289 0.246599710 -1.197388138 0.911853903 -2.398552640 [16] 0.163731265 -0.082039058 0.755131692 0.767982217 -1.393475392 [21] -1.414464923 0.282471651 0.945460404 -0.018838692 -2.055348806 [26] 0.215299481 -0.916456341 -1.312920286 0.573984970 0.253140871 [31] 1.096532576 0.607080785 -1.423950921 -1.528383343 -0.563838643 [36] -0.808467456 0.438454170 1.101736762 -0.756135518 1.295442201 [41] -0.518326652 -0.027269983 0.606457629 1.760022322 0.025922949 [46] 0.881991303 -1.311545453 -1.420519621 1.102910633 0.409552759 [51] 0.999668303 -2.178551392 -1.392394014 0.550429964 1.652603200 [56] 1.287191753 1.019811796 0.205771771 0.084987537 1.051649187 [61] -0.721686571 -0.424711180 -0.846154589 0.366925086 2.042491404 [66] 0.438981002 -1.637315255 -1.464347744 0.793618968 0.092634833 [71] 0.604711447 -0.564005495 -1.380020857 1.200438040 -0.975574696 [76] -1.443518663 0.109052806 -1.087000580 -0.431773808 -1.201686868 [81] 0.036676754 -0.150436080 0.398313970 0.007735541 1.094328357 [86] 1.374188752 -0.654909300 0.456774703 -0.133955027 -0.497379016 [91] 1.093960699 -0.431161640 -1.235047311 0.080792848 0.996197107 [96] -2.042421328 -0.137665487 -0.279548525 -0.669854162 1.120669666 > > colMeans(tmp2) [1] -0.05094707 > colSums(tmp2) [1] -5.094707 > colVars(tmp2) [1] 1.00995 > colSd(tmp2) [1] 1.004963 > colMax(tmp2) [1] 2.345626 > colMin(tmp2) [1] -2.398553 > colMedians(tmp2) [1] 0.0587348 > colRanges(tmp2) [,1] [1,] -2.398553 [2,] 2.345626 > > 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] -2.026588 -1.334578 4.476656 5.180464 3.006409 2.343039 4.609790 [8] 5.208499 1.056980 -1.097167 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3150070 [2,] -0.8287181 [3,] -0.1564576 [4,] 0.4426103 [5,] 0.8647789 > > rowApply(tmp,sum) [1] 1.1248921 -1.8230957 1.1500707 6.4558366 1.4533128 4.0402035 [7] 4.4899209 5.2790486 -0.9036675 0.1569819 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 9 4 2 5 4 6 6 1 5 3 [2,] 6 9 3 2 3 1 4 2 9 8 [3,] 4 3 6 6 10 3 8 7 1 10 [4,] 1 6 7 4 7 7 7 10 8 9 [5,] 5 2 10 8 1 10 9 4 7 1 [6,] 2 7 5 9 2 9 1 9 4 2 [7,] 8 8 4 7 9 5 5 3 10 4 [8,] 3 10 1 10 8 8 10 6 3 5 [9,] 10 5 9 1 5 2 2 8 6 6 [10,] 7 1 8 3 6 4 3 5 2 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.21207087 -2.78759393 -2.29114758 -1.46098123 0.62240953 2.74674254 [7] 0.69078633 0.16163361 1.17058897 2.47392557 3.60431100 -1.90096609 [13] 0.95529216 -0.08497823 1.15427040 -1.16764433 -1.13604120 2.32473242 [19] -3.10211016 1.15443985 > colApply(tmp,quantile)[,1] [,1] [1,] -0.81912289 [2,] -0.05606507 [3,] 0.31241954 [4,] 1.10508218 [5,] 1.66975711 > > rowApply(tmp,sum) [1] 1.096021 -1.667456 1.649087 -1.769468 6.031557 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 6 10 19 20 12 [2,] 2 4 3 15 10 [3,] 19 1 16 1 1 [4,] 10 7 5 6 9 [5,] 11 15 12 9 16 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.81912289 -1.2067408 1.6056449 -0.05770345 -0.051145816 0.5185033 [2,] -0.05606507 -1.2358701 -2.1834850 -0.32188378 0.256735611 2.1347498 [3,] 1.66975711 -1.0287762 1.1520898 -0.68233999 0.007605072 1.2804957 [4,] 1.10508218 0.5231595 -1.9877172 -0.53806846 -0.187308064 -1.0516381 [5,] 0.31241954 0.1606336 -0.8776801 0.13901444 0.596522726 -0.1353682 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.7629150 -0.5679757 0.72983375 0.9481397 -0.09840002 -1.07728013 [2,] 0.2423076 0.0219386 -0.13796275 0.6405499 1.61502267 0.25343551 [3,] -0.1010058 -0.6972440 -0.05716198 0.1720004 1.66543454 0.33156088 [4,] -1.6075699 0.9816699 1.05922736 0.8474936 0.32344873 -1.34392916 [5,] 0.3941395 0.4232449 -0.42334741 -0.1342581 0.09880508 -0.06475319 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.76049018 1.38296764 -0.6593592 -1.1714887 -0.88143383 1.16678238 [2,] -1.47670354 -0.80395928 -1.2897435 0.4056158 0.82706546 -0.03056327 [3,] 0.03279789 -0.33278253 2.3376939 -0.3844110 -1.81616017 -0.38833473 [4,] 0.48413841 -0.36144828 0.1870824 -0.3277739 0.82222700 0.12881798 [5,] 1.15456922 0.03024421 0.5785967 0.3104135 -0.08773964 1.44803007 [,19] [,20] [1,] -1.28761785 0.09901211 [2,] -0.07143883 -0.45720152 [3,] -1.49653176 -0.01560021 [4,] -1.04629916 0.21993680 [5,] 0.79977745 1.30829268 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 659 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 571 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.335145 -1.523778 -0.1579234 0.4562843 0.4106545 -0.7452847 0.2572831 col8 col9 col10 col11 col12 col13 col14 row1 0.245899 0.004831828 -0.7588695 1.102068 0.7381811 0.1763354 0.3308228 col15 col16 col17 col18 col19 col20 row1 -0.3124477 -1.428562 0.3280723 0.4744232 -0.2830789 1.473156 > tmp[,"col10"] col10 row1 -0.75886950 row2 0.44448863 row3 -0.37400212 row4 -0.92836608 row5 0.09508352 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.335145 -1.5237777 -0.1579234 0.4562843 0.4106545 -0.7452847 0.2572831 row5 -1.227071 -0.9768981 -1.0437529 0.5848065 0.3215077 -0.6533007 -0.3418944 col8 col9 col10 col11 col12 col13 row1 0.245899 0.004831828 -0.75886950 1.1020685 0.7381811 0.1763354 row5 0.172829 0.587691739 0.09508352 -0.8416516 -0.6752408 0.5038652 col14 col15 col16 col17 col18 col19 col20 row1 0.3308228 -0.3124477 -1.428562 0.3280723 0.4744232 -0.2830789 1.473156 row5 -0.4247215 -0.1262242 0.345119 -0.5003742 -0.2572268 0.5567925 -1.794810 > tmp[,c("col6","col20")] col6 col20 row1 -0.7452847 1.47315642 row2 0.1341504 -0.65531691 row3 -0.7006208 -0.05811683 row4 0.9832399 1.26573773 row5 -0.6533007 -1.79481036 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.7452847 1.473156 row5 -0.6533007 -1.794810 > > > > > 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 47.6206 49.92021 47.7757 49.56354 50.07486 104.8513 50.51751 48.87744 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.32273 48.77603 52.40167 48.57791 50.82983 51.3066 50.94275 49.81437 col17 col18 col19 col20 row1 49.19508 50.84016 51.14236 102.8356 > tmp[,"col10"] col10 row1 48.77603 row2 29.70600 row3 30.04315 row4 28.40885 row5 50.25842 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.62060 49.92021 47.77570 49.56354 50.07486 104.8513 50.51751 48.87744 row5 50.44115 50.88294 49.34596 49.40846 48.98409 103.3673 49.79474 49.07650 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.32273 48.77603 52.40167 48.57791 50.82983 51.30660 50.94275 49.81437 row5 51.77849 50.25842 50.50306 48.50234 50.70891 51.02515 48.90422 50.95043 col17 col18 col19 col20 row1 49.19508 50.84016 51.14236 102.8356 row5 51.44414 49.49429 50.00579 104.2566 > tmp[,c("col6","col20")] col6 col20 row1 104.85129 102.83562 row2 73.26402 74.45893 row3 76.30051 75.76697 row4 74.83209 75.23446 row5 103.36727 104.25661 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.8513 102.8356 row5 103.3673 104.2566 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.8513 102.8356 row5 103.3673 104.2566 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.0006939583 [2,] -0.4776514285 [3,] 0.1181193869 [4,] 0.7269043458 [5,] 0.1428801159 > tmp[,c("col17","col7")] col17 col7 [1,] 2.52984976 -1.00832095 [2,] -0.05339868 -0.18076865 [3,] -1.56583816 -2.43574332 [4,] -1.15573518 -0.12765814 [5,] 0.72104057 0.01281434 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.88502082 -1.085874683 [2,] 1.71035511 -0.474211271 [3,] -0.16972556 -1.233571415 [4,] 0.11235804 -0.082905244 [5,] -0.04384228 -0.005977629 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.8850208 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.8850208 [2,] 1.7103551 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 0.8765723 -0.92635124 0.11742612 1.1279977 -2.373998 -0.2738399 row1 -0.9543700 0.03433483 -0.06145019 -0.1669353 -1.931193 -2.1040156 [,7] [,8] [,9] [,10] [,11] [,12] row3 1.91485032 0.2522584 -1.1471473 0.3777502 -1.188711 -0.4901304 row1 -0.08929744 -0.5267523 0.9510429 -1.3850845 -1.954975 -0.5073042 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.7074492 0.01878445 -0.7315759 -1.125074 0.1829294 -0.08656074 row1 -0.7534791 -2.27468661 -0.5711925 1.756214 1.1045498 0.19352162 [,19] [,20] row3 -1.6932012 -0.1479727 row1 -0.9977936 -0.3248203 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.993854 -0.1327011 -0.09939203 0.6468255 -0.7683297 -0.2500604 1.765636 [,8] [,9] [,10] row2 0.9732125 1.212172 -0.2044165 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.9935329 -1.927424 -0.7204601 -0.6180299 -0.8420342 -1.132622 -0.8761537 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.981929 1.295359 0.5160346 -0.6211831 -0.4454768 0.3350761 -0.6921053 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.1794964 -0.4523703 -0.3842196 -1.025864 1.677786 -0.7517578 > > > 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: 0x0000023a175c50b0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a88132006" [2] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a837b8362f" [3] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a87d9164cb" [4] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a825ee313c" [5] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a8499f1e43" [6] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a820de49a9" [7] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a866e5c09" [8] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a81b035413" [9] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a8135cc1" [10] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a836c65a50" [11] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a81e56805" [12] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a824a11100" [13] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a857bf28a2" [14] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a82c854b64" [15] "C:/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM87a84a21705" > > > ### 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: 0x0000023a17bf0970> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x0000023a17bf0970> Warning message: In dir.create(new.directory) : 'C:\Users\biocbuild\bbs-3.20-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x0000023a17bf0970> > rowMedians(tmp) [1] 0.249623962 0.155557314 0.176560368 0.252885392 0.413562832 [6] -0.139004301 0.394147228 0.430218401 -0.131060861 0.416138731 [11] -0.059311810 -0.507448584 -0.797658241 -0.498175835 -0.786676143 [16] -0.105738184 -0.171352703 0.242672680 -0.505780941 -0.160104567 [21] -0.589234038 -0.053819161 0.273112576 0.041776219 -0.456079038 [26] 0.176833050 -0.384638527 -0.085418342 -0.390472903 0.091326518 [31] -0.503864734 0.009294024 0.334074494 0.090335369 1.017802674 [36] 0.368909317 0.450953447 -0.374395816 0.206969114 0.120889217 [41] -0.103958092 0.630284023 0.543060671 0.120613184 0.501513688 [46] 0.186930406 -0.697189343 -0.448310591 0.062926416 -0.329831369 [51] 0.234680702 0.257351905 -0.179803960 -0.588949763 0.148828602 [56] 0.617753484 0.011707271 -0.497232880 0.233259127 -0.180655135 [61] -0.298664416 -0.502801818 -0.570855226 0.102787360 -0.070035754 [66] -0.018889337 -0.118075712 0.181978933 0.164545524 0.373575392 [71] -0.397582892 -0.204629961 0.052020537 0.149214101 -0.074934131 [76] 0.126639472 -0.140541160 0.311830459 0.539288239 0.108762013 [81] -0.240243354 0.075883249 -0.264331289 -0.115203040 0.319154680 [86] 0.144828561 -0.124434742 0.409226522 0.652505942 -0.761576588 [91] 0.037610406 0.098649324 -0.123128973 -0.754397022 -0.029592218 [96] -0.032216500 -0.149984108 0.100627483 -0.062593392 0.225540267 [101] -0.050411106 -0.138247878 -0.253068141 -0.362005915 -0.045379895 [106] -0.680830173 0.092602687 -0.411528772 0.509088452 -0.135951433 [111] -0.170591838 -0.078164634 -0.161081250 -0.079815056 -0.203416609 [116] -0.218289773 -0.319737676 -0.490472310 0.134986378 0.228172527 [121] 0.145395953 0.377674119 -0.275469548 -0.411570560 -0.089556443 [126] 0.270167326 -0.232951116 0.197649831 -0.353690665 -0.037760494 [131] -0.215008255 -0.442486128 0.301337643 -0.668985292 -0.323216957 [136] 0.347494503 -0.225297175 -0.115333570 -0.310514843 0.119266491 [141] 0.285025416 -0.452399240 0.345517635 0.095777915 0.140657959 [146] -0.694688702 -0.081684997 0.471551064 -0.061637748 -0.400039964 [151] 0.265985760 0.021172645 -0.174988320 -0.258974578 -0.335251828 [156] -0.462224477 -0.196734543 0.285901808 0.100169798 -0.340765807 [161] -0.085214775 -0.012862675 -0.025558857 -0.067152170 -0.339408064 [166] 0.712823879 -0.198601936 -0.171270852 0.352923327 -0.207911383 [171] 0.342542980 0.079217161 -0.448206623 -0.150315877 0.102238395 [176] -0.472952828 0.265674035 0.392870877 -0.142201669 0.005583504 [181] 0.141172632 0.155786816 -0.112518401 -0.352545388 0.082067985 [186] 0.179674823 0.294155994 0.348692290 0.066710552 0.526560704 [191] -0.384843300 -0.367887373 -0.383705453 0.108129406 -0.066297548 [196] -0.401471669 0.123589956 0.138710001 0.214413491 0.233214551 [201] 0.354454284 -0.108615632 0.084096204 0.087323266 0.044847473 [206] -0.120340595 -0.440573828 -0.141262798 0.463096922 -0.484523222 [211] 0.135684886 -0.186863898 -0.342297751 0.273461648 0.031515356 [216] -0.414420884 0.067447797 0.636215794 0.568593170 0.422909503 [221] -0.423845838 -0.006836372 -0.047652703 -0.073544677 -0.271824933 [226] -0.045000398 0.255505089 0.431933864 0.050432962 0.078786990 > > proc.time() user system elapsed 3.40 15.31 46.73
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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: 0x00000221ba2ff0b0> > .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: 0x00000221ba2ff0b0> > .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: 0x00000221ba2ff0b0> > .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: 0x00000221ba2ff0b0> > 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: 0x00000221ba2ffad0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221ba2ffad0> > .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: 0x00000221ba2ffad0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221ba2ffad0> > .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: 0x00000221ba2ffad0> > 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: 0x00000221ba2ff110> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221ba2ff110> > .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: 0x00000221ba2ff110> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000221ba2ff110> > .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: 0x00000221ba2ff110> > > .Call("R_bm_RowMode",P) <pointer: 0x00000221ba2ff110> > .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: 0x00000221ba2ff110> > > .Call("R_bm_ColMode",P) <pointer: 0x00000221ba2ff110> > .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: 0x00000221ba2ff110> > 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: 0x00000221b9613d70> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x00000221b9613d70> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221b9613d70> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221b9613d70> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile38ed03a0973aa" "BufferedMatrixFile38ed0578cd81" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile38ed03a0973aa" "BufferedMatrixFile38ed0578cd81" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x00000221ba2fff50> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221ba2fff50> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000221ba2fff50> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000221ba2fff50> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x00000221ba2fff50> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x00000221ba2fff50> > .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: 0x00000221bc6fb9b0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000221bc6fb9b0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000221bc6fb9b0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x00000221bc6fb9b0> > 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: 0x00000221bc6fbb30> > .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: 0x00000221bc6fbb30> > rm(P) > > proc.time() user system elapsed 0.26 0.14 0.48
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.20 0.06 0.25