Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-05-17 11:37:13 -0400 (Fri, 17 May 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 RC (2024-04-16 r86468) -- "Puppy Cup" | 4663 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" | 4398 |
merida1 | macOS 12.7.4 Monterey | x86_64 | 4.4.0 Patched (2024-04-24 r86482) -- "Puppy Cup" | 4425 |
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 244/2230 | 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 | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.4 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 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.69.0 |
Command: F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz |
StartedAt: 2024-05-15 22:58:07 -0400 (Wed, 15 May 2024) |
EndedAt: 2024-05-15 22:59:12 -0400 (Wed, 15 May 2024) |
EllapsedTime: 65.8 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.4.0 RC (2024-04-16 r86468 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 'F:/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 'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/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"F:/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"F:/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"F:/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"F:/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 -LF:/biocbuild/bbs-3.20-bioc/R/bin/x64 -lR installing to F:/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.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" 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.31 0.21 0.64
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" 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] "F:/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 1021761 54.6 633414 33.9 Vcells 853870 6.6 8388608 64.0 2003120 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] "Wed May 15 22:58:31 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] "Wed May 15 22:58:32 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: 0x00000228a2cffa10> > > > > 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] "Wed May 15 22:58:38 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] "Wed May 15 22:58:40 2024" > > ColMode(tmp2) <pointer: 0x00000228a2cffa10> > > > > ### 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.6829447 -0.91874908 0.8979749 -1.1642977 [2,] 0.5504049 -1.60721046 -0.6966527 0.4737180 [3,] -1.2747756 0.05689441 1.2970158 3.4926930 [4,] 2.1472889 -0.41651682 0.4937177 0.7581228 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-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.6829447 0.91874908 0.8979749 1.1642977 [2,] 0.5504049 1.60721046 0.6966527 0.4737180 [3,] 1.2747756 0.05689441 1.2970158 3.4926930 [4,] 2.1472889 0.41651682 0.4937177 0.7581228 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-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.0340891 0.9585140 0.9476154 1.0790263 [2,] 0.7418928 1.2677580 0.8346572 0.6882718 [3,] 1.1290596 0.2385255 1.1388660 1.8688748 [4,] 1.4653631 0.6453811 0.7026505 0.8707025 > > 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.20-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,] 226.02384 35.50389 35.37413 36.95456 [2,] 32.96933 39.28479 34.04322 32.35644 [3,] 37.56537 27.44215 37.68568 47.18144 [4,] 41.80092 31.87033 32.52022 34.46515 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x00000228a2cff830> > exp(tmp5) <pointer: 0x00000228a2cff830> > log(tmp5,2) <pointer: 0x00000228a2cff830> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 470.439 > Min(tmp5) [1] 54.72107 > mean(tmp5) [1] 73.84232 > Sum(tmp5) [1] 14768.46 > Var(tmp5) [1] 874.7418 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 95.20021 71.73998 72.76138 72.58899 67.28429 73.19528 69.49112 76.09125 [9] 70.98298 69.08772 > rowSums(tmp5) [1] 1904.004 1434.800 1455.228 1451.780 1345.686 1463.906 1389.822 1521.825 [9] 1419.660 1381.754 > rowVars(tmp5) [1] 7907.70013 79.20109 94.30151 64.95644 58.31298 93.57463 [7] 70.31832 61.82836 71.08351 69.42120 > rowSd(tmp5) [1] 88.925250 8.899499 9.710896 8.059556 7.636293 9.673398 8.385602 [8] 7.863101 8.431104 8.331939 > rowMax(tmp5) [1] 470.43900 86.92505 98.20199 87.00314 80.62296 100.03966 84.63461 [8] 91.10166 83.45674 91.13882 > rowMin(tmp5) [1] 56.03134 55.31193 57.11724 58.26430 54.72107 56.73589 55.83058 59.11855 [9] 56.41597 61.03928 > > colMeans(tmp5) [1] 110.55941 69.64758 74.20546 75.80079 68.79017 72.04347 69.76478 [8] 67.66189 70.80892 74.89065 68.99124 74.61480 71.08709 73.53765 [15] 71.96769 74.73003 73.33454 70.93605 67.51309 75.96106 > colSums(tmp5) [1] 1105.5941 696.4758 742.0546 758.0079 687.9017 720.4347 697.6478 [8] 676.6189 708.0892 748.9065 689.9124 746.1480 710.8709 735.3765 [15] 719.6769 747.3003 733.3454 709.3605 675.1309 759.6106 > colVars(tmp5) [1] 16055.51848 144.96680 140.53714 90.01953 98.12248 34.05471 [7] 139.36056 31.08079 53.01016 97.99781 79.11476 78.68468 [13] 32.60135 152.39226 53.11177 43.59263 86.37170 53.89559 [19] 104.80172 46.76568 > colSd(tmp5) [1] 126.710372 12.040216 11.854836 9.487862 9.905679 5.835642 [7] 11.805107 5.575015 7.280808 9.899385 8.894648 8.870439 [13] 5.709759 12.344726 7.287783 6.602472 9.293638 7.341362 [19] 10.237271 6.838543 > colMax(tmp5) [1] 470.43900 91.10166 100.03966 98.20199 85.62324 81.48270 88.16238 [8] 79.18142 81.58287 86.53951 84.07976 93.84568 77.39335 91.13882 [15] 83.45674 80.76874 90.14337 81.77549 87.82610 86.11514 > colMin(tmp5) [1] 61.73238 54.72107 59.14083 62.16013 60.44056 61.00646 55.46182 58.57791 [9] 61.10783 55.96169 56.03134 63.07232 61.63581 55.83058 58.66925 60.67884 [17] 60.97272 61.40716 55.31193 65.99941 > > > ### 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] 95.20021 71.73998 72.76138 72.58899 67.28429 73.19528 NA 76.09125 [9] 70.98298 69.08772 > rowSums(tmp5) [1] 1904.004 1434.800 1455.228 1451.780 1345.686 1463.906 NA 1521.825 [9] 1419.660 1381.754 > rowVars(tmp5) [1] 7907.70013 79.20109 94.30151 64.95644 58.31298 93.57463 [7] 72.92373 61.82836 71.08351 69.42120 > rowSd(tmp5) [1] 88.925250 8.899499 9.710896 8.059556 7.636293 9.673398 8.539539 [8] 7.863101 8.431104 8.331939 > rowMax(tmp5) [1] 470.43900 86.92505 98.20199 87.00314 80.62296 100.03966 NA [8] 91.10166 83.45674 91.13882 > rowMin(tmp5) [1] 56.03134 55.31193 57.11724 58.26430 54.72107 56.73589 NA 59.11855 [9] 56.41597 61.03928 > > colMeans(tmp5) [1] 110.55941 69.64758 74.20546 75.80079 68.79017 72.04347 69.76478 [8] 67.66189 70.80892 74.89065 68.99124 74.61480 71.08709 73.53765 [15] 71.96769 74.73003 73.33454 NA 67.51309 75.96106 > colSums(tmp5) [1] 1105.5941 696.4758 742.0546 758.0079 687.9017 720.4347 697.6478 [8] 676.6189 708.0892 748.9065 689.9124 746.1480 710.8709 735.3765 [15] 719.6769 747.3003 733.3454 NA 675.1309 759.6106 > colVars(tmp5) [1] 16055.51848 144.96680 140.53714 90.01953 98.12248 34.05471 [7] 139.36056 31.08079 53.01016 97.99781 79.11476 78.68468 [13] 32.60135 152.39226 53.11177 43.59263 86.37170 NA [19] 104.80172 46.76568 > colSd(tmp5) [1] 126.710372 12.040216 11.854836 9.487862 9.905679 5.835642 [7] 11.805107 5.575015 7.280808 9.899385 8.894648 8.870439 [13] 5.709759 12.344726 7.287783 6.602472 9.293638 NA [19] 10.237271 6.838543 > colMax(tmp5) [1] 470.43900 91.10166 100.03966 98.20199 85.62324 81.48270 88.16238 [8] 79.18142 81.58287 86.53951 84.07976 93.84568 77.39335 91.13882 [15] 83.45674 80.76874 90.14337 NA 87.82610 86.11514 > colMin(tmp5) [1] 61.73238 54.72107 59.14083 62.16013 60.44056 61.00646 55.46182 58.57791 [9] 61.10783 55.96169 56.03134 63.07232 61.63581 55.83058 58.66925 60.67884 [17] 60.97272 NA 55.31193 65.99941 > > Max(tmp5,na.rm=TRUE) [1] 470.439 > Min(tmp5,na.rm=TRUE) [1] 54.72107 > mean(tmp5,na.rm=TRUE) [1] 73.88789 > Sum(tmp5,na.rm=TRUE) [1] 14703.69 > Var(tmp5,na.rm=TRUE) [1] 878.7423 > > rowMeans(tmp5,na.rm=TRUE) [1] 95.20021 71.73998 72.76138 72.58899 67.28429 73.19528 69.73939 76.09125 [9] 70.98298 69.08772 > rowSums(tmp5,na.rm=TRUE) [1] 1904.004 1434.800 1455.228 1451.780 1345.686 1463.906 1325.048 1521.825 [9] 1419.660 1381.754 > rowVars(tmp5,na.rm=TRUE) [1] 7907.70013 79.20109 94.30151 64.95644 58.31298 93.57463 [7] 72.92373 61.82836 71.08351 69.42120 > rowSd(tmp5,na.rm=TRUE) [1] 88.925250 8.899499 9.710896 8.059556 7.636293 9.673398 8.539539 [8] 7.863101 8.431104 8.331939 > rowMax(tmp5,na.rm=TRUE) [1] 470.43900 86.92505 98.20199 87.00314 80.62296 100.03966 84.63461 [8] 91.10166 83.45674 91.13882 > rowMin(tmp5,na.rm=TRUE) [1] 56.03134 55.31193 57.11724 58.26430 54.72107 56.73589 55.83058 59.11855 [9] 56.41597 61.03928 > > colMeans(tmp5,na.rm=TRUE) [1] 110.55941 69.64758 74.20546 75.80079 68.79017 72.04347 69.76478 [8] 67.66189 70.80892 74.89065 68.99124 74.61480 71.08709 73.53765 [15] 71.96769 74.73003 73.33454 71.62071 67.51309 75.96106 > colSums(tmp5,na.rm=TRUE) [1] 1105.5941 696.4758 742.0546 758.0079 687.9017 720.4347 697.6478 [8] 676.6189 708.0892 748.9065 689.9124 746.1480 710.8709 735.3765 [15] 719.6769 747.3003 733.3454 644.5864 675.1309 759.6106 > colVars(tmp5,na.rm=TRUE) [1] 16055.51848 144.96680 140.53714 90.01953 98.12248 34.05471 [7] 139.36056 31.08079 53.01016 97.99781 79.11476 78.68468 [13] 32.60135 152.39226 53.11177 43.59263 86.37170 55.35906 [19] 104.80172 46.76568 > colSd(tmp5,na.rm=TRUE) [1] 126.710372 12.040216 11.854836 9.487862 9.905679 5.835642 [7] 11.805107 5.575015 7.280808 9.899385 8.894648 8.870439 [13] 5.709759 12.344726 7.287783 6.602472 9.293638 7.440367 [19] 10.237271 6.838543 > colMax(tmp5,na.rm=TRUE) [1] 470.43900 91.10166 100.03966 98.20199 85.62324 81.48270 88.16238 [8] 79.18142 81.58287 86.53951 84.07976 93.84568 77.39335 91.13882 [15] 83.45674 80.76874 90.14337 81.77549 87.82610 86.11514 > colMin(tmp5,na.rm=TRUE) [1] 61.73238 54.72107 59.14083 62.16013 60.44056 61.00646 55.46182 58.57791 [9] 61.10783 55.96169 56.03134 63.07232 61.63581 55.83058 58.66925 60.67884 [17] 60.97272 61.40716 55.31193 65.99941 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 95.20021 71.73998 72.76138 72.58899 67.28429 73.19528 NaN 76.09125 [9] 70.98298 69.08772 > rowSums(tmp5,na.rm=TRUE) [1] 1904.004 1434.800 1455.228 1451.780 1345.686 1463.906 0.000 1521.825 [9] 1419.660 1381.754 > rowVars(tmp5,na.rm=TRUE) [1] 7907.70013 79.20109 94.30151 64.95644 58.31298 93.57463 [7] NA 61.82836 71.08351 69.42120 > rowSd(tmp5,na.rm=TRUE) [1] 88.925250 8.899499 9.710896 8.059556 7.636293 9.673398 NA [8] 7.863101 8.431104 8.331939 > rowMax(tmp5,na.rm=TRUE) [1] 470.43900 86.92505 98.20199 87.00314 80.62296 100.03966 NA [8] 91.10166 83.45674 91.13882 > rowMin(tmp5,na.rm=TRUE) [1] 56.03134 55.31193 57.11724 58.26430 54.72107 56.73589 NA 59.11855 [9] 56.41597 61.03928 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.79415 68.54864 74.95525 76.18744 69.31271 71.98872 68.44695 [8] 67.58248 70.27169 76.99387 69.82814 75.89730 70.74209 75.50510 [15] 72.24304 74.25448 73.05153 NaN 68.29409 74.99733 > colSums(tmp5,na.rm=TRUE) [1] 1042.1473 616.9378 674.5973 685.6869 623.8144 647.8985 616.0225 [8] 608.2424 632.4452 692.9448 628.4533 683.0757 636.6788 679.5459 [15] 650.1874 668.2903 657.4637 0.0000 614.6469 674.9760 > colVars(tmp5,na.rm=TRUE) [1] 17754.18065 149.50128 151.77970 99.59014 107.31602 38.27783 [7] 137.24294 34.89495 56.38954 60.48288 81.12462 70.01624 [13] 35.33742 127.89404 58.89781 46.49755 96.26710 NA [19] 111.03988 42.16271 > colSd(tmp5,na.rm=TRUE) [1] 133.244815 12.227072 12.319890 9.979486 10.359345 6.186908 [7] 11.715073 5.907194 7.509297 7.777074 9.006921 8.367571 [13] 5.944529 11.309025 7.674491 6.818912 9.811580 NA [19] 10.537546 6.493282 > colMax(tmp5,na.rm=TRUE) [1] 470.43900 91.10166 100.03966 98.20199 85.62324 81.48270 88.16238 [8] 79.18142 81.58287 86.53951 84.07976 93.84568 77.39335 91.13882 [15] 83.45674 80.76874 90.14337 -Inf 87.82610 86.11514 > colMin(tmp5,na.rm=TRUE) [1] 61.73238 54.72107 59.14083 62.16013 60.44056 61.00646 55.46182 58.57791 [9] 61.10783 65.96880 56.03134 63.80459 61.63581 56.41597 58.66925 60.67884 [17] 60.97272 Inf 55.31193 65.99941 > > > > > 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] 132.7511 159.5166 229.5346 296.9447 265.4269 203.1636 293.3180 168.9740 [9] 152.7936 141.2235 > apply(copymatrix,1,var,na.rm=TRUE) [1] 132.7511 159.5166 229.5346 296.9447 265.4269 203.1636 293.3180 168.9740 [9] 152.7936 141.2235 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 -2.842171e-14 -2.842171e-14 2.842171e-14 -5.684342e-14 [6] -1.136868e-13 0.000000e+00 5.684342e-14 7.105427e-14 2.842171e-14 [11] 0.000000e+00 5.684342e-14 -2.842171e-14 2.273737e-13 -1.421085e-14 [16] 8.526513e-14 7.105427e-15 1.705303e-13 2.842171e-14 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) + } 7 2 2 13 6 12 6 10 10 20 4 6 3 5 7 12 7 17 7 2 4 18 6 3 6 10 8 6 9 14 9 4 8 13 6 8 9 11 5 14 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] 1.973363 > Min(tmp) [1] -1.97047 > mean(tmp) [1] 0.02627622 > Sum(tmp) [1] 2.627622 > Var(tmp) [1] 0.8660716 > > rowMeans(tmp) [1] 0.02627622 > rowSums(tmp) [1] 2.627622 > rowVars(tmp) [1] 0.8660716 > rowSd(tmp) [1] 0.9306297 > rowMax(tmp) [1] 1.973363 > rowMin(tmp) [1] -1.97047 > > colMeans(tmp) [1] -0.655991019 -1.242243512 -0.013421581 0.493230360 -1.663161891 [6] -0.673228756 0.206522455 -1.970470097 -0.053908685 1.054340778 [11] -0.045738809 1.841858743 -1.183300475 0.001802108 -0.188473683 [16] 0.012609182 0.842299719 -1.770890326 0.136089748 -1.205809896 [21] -0.045837637 -1.001908103 -0.641919794 -1.870820564 -0.187296998 [26] 0.597376670 0.228548005 -0.533109434 1.300372652 0.356976698 [31] 0.758995074 -0.321963762 -0.707368367 -1.078230760 0.800846119 [36] 0.463171741 -0.533742415 0.443724896 1.124920314 0.335090858 [41] 0.576030474 -0.781537062 -0.566613116 0.621583895 1.367646355 [46] 0.733227314 -0.943684579 0.291750045 1.687791776 0.942668160 [51] -0.013987573 -0.292065303 0.250856465 -0.764293321 0.993754382 [56] -1.114123839 1.494834355 -1.343037904 -1.467612274 0.253291990 [61] -1.782138060 0.360941170 0.022040441 0.206894002 -0.923396073 [66] 0.428512404 -0.612802945 1.973362908 0.195904725 0.044599880 [71] -0.476105085 0.524483108 0.114402808 0.406138761 1.007166173 [76] -0.738247039 -1.744452740 -0.006000132 0.285210319 1.878221770 [81] 1.217378850 -0.680485290 -0.764198711 -0.079964672 -0.039588758 [86] 1.724577447 0.527045858 -0.065430226 1.011812600 -0.017722670 [91] 0.952095878 -1.196920911 1.283276946 1.050107485 0.304342797 [96] 1.334273029 -0.011180577 0.855628174 0.298283135 -1.576864371 > colSums(tmp) [1] -0.655991019 -1.242243512 -0.013421581 0.493230360 -1.663161891 [6] -0.673228756 0.206522455 -1.970470097 -0.053908685 1.054340778 [11] -0.045738809 1.841858743 -1.183300475 0.001802108 -0.188473683 [16] 0.012609182 0.842299719 -1.770890326 0.136089748 -1.205809896 [21] -0.045837637 -1.001908103 -0.641919794 -1.870820564 -0.187296998 [26] 0.597376670 0.228548005 -0.533109434 1.300372652 0.356976698 [31] 0.758995074 -0.321963762 -0.707368367 -1.078230760 0.800846119 [36] 0.463171741 -0.533742415 0.443724896 1.124920314 0.335090858 [41] 0.576030474 -0.781537062 -0.566613116 0.621583895 1.367646355 [46] 0.733227314 -0.943684579 0.291750045 1.687791776 0.942668160 [51] -0.013987573 -0.292065303 0.250856465 -0.764293321 0.993754382 [56] -1.114123839 1.494834355 -1.343037904 -1.467612274 0.253291990 [61] -1.782138060 0.360941170 0.022040441 0.206894002 -0.923396073 [66] 0.428512404 -0.612802945 1.973362908 0.195904725 0.044599880 [71] -0.476105085 0.524483108 0.114402808 0.406138761 1.007166173 [76] -0.738247039 -1.744452740 -0.006000132 0.285210319 1.878221770 [81] 1.217378850 -0.680485290 -0.764198711 -0.079964672 -0.039588758 [86] 1.724577447 0.527045858 -0.065430226 1.011812600 -0.017722670 [91] 0.952095878 -1.196920911 1.283276946 1.050107485 0.304342797 [96] 1.334273029 -0.011180577 0.855628174 0.298283135 -1.576864371 > 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.655991019 -1.242243512 -0.013421581 0.493230360 -1.663161891 [6] -0.673228756 0.206522455 -1.970470097 -0.053908685 1.054340778 [11] -0.045738809 1.841858743 -1.183300475 0.001802108 -0.188473683 [16] 0.012609182 0.842299719 -1.770890326 0.136089748 -1.205809896 [21] -0.045837637 -1.001908103 -0.641919794 -1.870820564 -0.187296998 [26] 0.597376670 0.228548005 -0.533109434 1.300372652 0.356976698 [31] 0.758995074 -0.321963762 -0.707368367 -1.078230760 0.800846119 [36] 0.463171741 -0.533742415 0.443724896 1.124920314 0.335090858 [41] 0.576030474 -0.781537062 -0.566613116 0.621583895 1.367646355 [46] 0.733227314 -0.943684579 0.291750045 1.687791776 0.942668160 [51] -0.013987573 -0.292065303 0.250856465 -0.764293321 0.993754382 [56] -1.114123839 1.494834355 -1.343037904 -1.467612274 0.253291990 [61] -1.782138060 0.360941170 0.022040441 0.206894002 -0.923396073 [66] 0.428512404 -0.612802945 1.973362908 0.195904725 0.044599880 [71] -0.476105085 0.524483108 0.114402808 0.406138761 1.007166173 [76] -0.738247039 -1.744452740 -0.006000132 0.285210319 1.878221770 [81] 1.217378850 -0.680485290 -0.764198711 -0.079964672 -0.039588758 [86] 1.724577447 0.527045858 -0.065430226 1.011812600 -0.017722670 [91] 0.952095878 -1.196920911 1.283276946 1.050107485 0.304342797 [96] 1.334273029 -0.011180577 0.855628174 0.298283135 -1.576864371 > colMin(tmp) [1] -0.655991019 -1.242243512 -0.013421581 0.493230360 -1.663161891 [6] -0.673228756 0.206522455 -1.970470097 -0.053908685 1.054340778 [11] -0.045738809 1.841858743 -1.183300475 0.001802108 -0.188473683 [16] 0.012609182 0.842299719 -1.770890326 0.136089748 -1.205809896 [21] -0.045837637 -1.001908103 -0.641919794 -1.870820564 -0.187296998 [26] 0.597376670 0.228548005 -0.533109434 1.300372652 0.356976698 [31] 0.758995074 -0.321963762 -0.707368367 -1.078230760 0.800846119 [36] 0.463171741 -0.533742415 0.443724896 1.124920314 0.335090858 [41] 0.576030474 -0.781537062 -0.566613116 0.621583895 1.367646355 [46] 0.733227314 -0.943684579 0.291750045 1.687791776 0.942668160 [51] -0.013987573 -0.292065303 0.250856465 -0.764293321 0.993754382 [56] -1.114123839 1.494834355 -1.343037904 -1.467612274 0.253291990 [61] -1.782138060 0.360941170 0.022040441 0.206894002 -0.923396073 [66] 0.428512404 -0.612802945 1.973362908 0.195904725 0.044599880 [71] -0.476105085 0.524483108 0.114402808 0.406138761 1.007166173 [76] -0.738247039 -1.744452740 -0.006000132 0.285210319 1.878221770 [81] 1.217378850 -0.680485290 -0.764198711 -0.079964672 -0.039588758 [86] 1.724577447 0.527045858 -0.065430226 1.011812600 -0.017722670 [91] 0.952095878 -1.196920911 1.283276946 1.050107485 0.304342797 [96] 1.334273029 -0.011180577 0.855628174 0.298283135 -1.576864371 > colMedians(tmp) [1] -0.655991019 -1.242243512 -0.013421581 0.493230360 -1.663161891 [6] -0.673228756 0.206522455 -1.970470097 -0.053908685 1.054340778 [11] -0.045738809 1.841858743 -1.183300475 0.001802108 -0.188473683 [16] 0.012609182 0.842299719 -1.770890326 0.136089748 -1.205809896 [21] -0.045837637 -1.001908103 -0.641919794 -1.870820564 -0.187296998 [26] 0.597376670 0.228548005 -0.533109434 1.300372652 0.356976698 [31] 0.758995074 -0.321963762 -0.707368367 -1.078230760 0.800846119 [36] 0.463171741 -0.533742415 0.443724896 1.124920314 0.335090858 [41] 0.576030474 -0.781537062 -0.566613116 0.621583895 1.367646355 [46] 0.733227314 -0.943684579 0.291750045 1.687791776 0.942668160 [51] -0.013987573 -0.292065303 0.250856465 -0.764293321 0.993754382 [56] -1.114123839 1.494834355 -1.343037904 -1.467612274 0.253291990 [61] -1.782138060 0.360941170 0.022040441 0.206894002 -0.923396073 [66] 0.428512404 -0.612802945 1.973362908 0.195904725 0.044599880 [71] -0.476105085 0.524483108 0.114402808 0.406138761 1.007166173 [76] -0.738247039 -1.744452740 -0.006000132 0.285210319 1.878221770 [81] 1.217378850 -0.680485290 -0.764198711 -0.079964672 -0.039588758 [86] 1.724577447 0.527045858 -0.065430226 1.011812600 -0.017722670 [91] 0.952095878 -1.196920911 1.283276946 1.050107485 0.304342797 [96] 1.334273029 -0.011180577 0.855628174 0.298283135 -1.576864371 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.655991 -1.242244 -0.01342158 0.4932304 -1.663162 -0.6732288 0.2065225 [2,] -0.655991 -1.242244 -0.01342158 0.4932304 -1.663162 -0.6732288 0.2065225 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.97047 -0.05390869 1.054341 -0.04573881 1.841859 -1.1833 0.001802108 [2,] -1.97047 -0.05390869 1.054341 -0.04573881 1.841859 -1.1833 0.001802108 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.1884737 0.01260918 0.8422997 -1.77089 0.1360897 -1.20581 -0.04583764 [2,] -0.1884737 0.01260918 0.8422997 -1.77089 0.1360897 -1.20581 -0.04583764 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.001908 -0.6419198 -1.870821 -0.187297 0.5973767 0.228548 -0.5331094 [2,] -1.001908 -0.6419198 -1.870821 -0.187297 0.5973767 0.228548 -0.5331094 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.300373 0.3569767 0.7589951 -0.3219638 -0.7073684 -1.078231 0.8008461 [2,] 1.300373 0.3569767 0.7589951 -0.3219638 -0.7073684 -1.078231 0.8008461 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.4631717 -0.5337424 0.4437249 1.12492 0.3350909 0.5760305 -0.7815371 [2,] 0.4631717 -0.5337424 0.4437249 1.12492 0.3350909 0.5760305 -0.7815371 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.5666131 0.6215839 1.367646 0.7332273 -0.9436846 0.29175 1.687792 [2,] -0.5666131 0.6215839 1.367646 0.7332273 -0.9436846 0.29175 1.687792 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.9426682 -0.01398757 -0.2920653 0.2508565 -0.7642933 0.9937544 -1.114124 [2,] 0.9426682 -0.01398757 -0.2920653 0.2508565 -0.7642933 0.9937544 -1.114124 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.494834 -1.343038 -1.467612 0.253292 -1.782138 0.3609412 0.02204044 [2,] 1.494834 -1.343038 -1.467612 0.253292 -1.782138 0.3609412 0.02204044 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.206894 -0.9233961 0.4285124 -0.6128029 1.973363 0.1959047 0.04459988 [2,] 0.206894 -0.9233961 0.4285124 -0.6128029 1.973363 0.1959047 0.04459988 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.4761051 0.5244831 0.1144028 0.4061388 1.007166 -0.738247 -1.744453 [2,] -0.4761051 0.5244831 0.1144028 0.4061388 1.007166 -0.738247 -1.744453 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.006000132 0.2852103 1.878222 1.217379 -0.6804853 -0.7641987 -0.07996467 [2,] -0.006000132 0.2852103 1.878222 1.217379 -0.6804853 -0.7641987 -0.07996467 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.03958876 1.724577 0.5270459 -0.06543023 1.011813 -0.01772267 0.9520959 [2,] -0.03958876 1.724577 0.5270459 -0.06543023 1.011813 -0.01772267 0.9520959 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.196921 1.283277 1.050107 0.3043428 1.334273 -0.01118058 0.8556282 [2,] -1.196921 1.283277 1.050107 0.3043428 1.334273 -0.01118058 0.8556282 [,99] [,100] [1,] 0.2982831 -1.576864 [2,] 0.2982831 -1.576864 > > > Max(tmp2) [1] 2.635198 > Min(tmp2) [1] -2.12564 > mean(tmp2) [1] -0.04454917 > Sum(tmp2) [1] -4.454917 > Var(tmp2) [1] 0.8722238 > > rowMeans(tmp2) [1] 0.73530871 0.19270286 -0.40815575 -0.77464997 -1.43495150 -1.10269739 [7] -0.15237833 1.52198220 -0.89135967 -1.51536664 -1.34620529 -0.25535147 [13] 0.25737862 0.38347982 0.27738616 -0.53898635 -0.41826148 0.15983961 [19] 0.69545875 -0.56134139 0.61703579 -0.45053587 1.63628918 -0.40298012 [25] -0.15093756 -1.14707729 -0.02268810 1.15853871 -1.21411861 2.22352794 [31] -1.22190026 1.14416213 -1.80551914 0.28287263 -0.05834867 -0.80278809 [37] 0.08753834 -0.38692831 0.56247671 0.05001124 -0.93983988 -0.28965555 [43] 0.71894614 -0.28706505 -0.92247681 -0.14457708 -0.59800235 0.35255720 [49] 0.12236206 1.07343760 -2.12564016 2.63519843 0.42634753 0.29254620 [55] 0.47028695 1.34534224 -1.83483151 -1.11027645 0.51969192 -0.51935745 [61] -0.40755711 -0.21171355 -1.07816164 1.30589113 1.26524497 -2.11063255 [67] -0.93983748 0.92849508 -0.73808193 -1.66686532 -0.22000840 0.31930451 [73] 0.20524848 -0.48266692 -0.19435965 -0.10912142 -0.02460686 0.06326153 [79] -0.58016902 -1.73164419 0.61185939 -0.99534019 1.16105247 -1.09734636 [85] 0.43146444 0.81192421 0.70198011 1.00550041 0.28548387 -0.13079575 [91] 0.80311059 0.03769102 -0.08395802 -0.26653887 1.24718659 0.83561263 [97] -0.31025307 0.97076303 1.22685018 0.59936049 > rowSums(tmp2) [1] 0.73530871 0.19270286 -0.40815575 -0.77464997 -1.43495150 -1.10269739 [7] -0.15237833 1.52198220 -0.89135967 -1.51536664 -1.34620529 -0.25535147 [13] 0.25737862 0.38347982 0.27738616 -0.53898635 -0.41826148 0.15983961 [19] 0.69545875 -0.56134139 0.61703579 -0.45053587 1.63628918 -0.40298012 [25] -0.15093756 -1.14707729 -0.02268810 1.15853871 -1.21411861 2.22352794 [31] -1.22190026 1.14416213 -1.80551914 0.28287263 -0.05834867 -0.80278809 [37] 0.08753834 -0.38692831 0.56247671 0.05001124 -0.93983988 -0.28965555 [43] 0.71894614 -0.28706505 -0.92247681 -0.14457708 -0.59800235 0.35255720 [49] 0.12236206 1.07343760 -2.12564016 2.63519843 0.42634753 0.29254620 [55] 0.47028695 1.34534224 -1.83483151 -1.11027645 0.51969192 -0.51935745 [61] -0.40755711 -0.21171355 -1.07816164 1.30589113 1.26524497 -2.11063255 [67] -0.93983748 0.92849508 -0.73808193 -1.66686532 -0.22000840 0.31930451 [73] 0.20524848 -0.48266692 -0.19435965 -0.10912142 -0.02460686 0.06326153 [79] -0.58016902 -1.73164419 0.61185939 -0.99534019 1.16105247 -1.09734636 [85] 0.43146444 0.81192421 0.70198011 1.00550041 0.28548387 -0.13079575 [91] 0.80311059 0.03769102 -0.08395802 -0.26653887 1.24718659 0.83561263 [97] -0.31025307 0.97076303 1.22685018 0.59936049 > 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.73530871 0.19270286 -0.40815575 -0.77464997 -1.43495150 -1.10269739 [7] -0.15237833 1.52198220 -0.89135967 -1.51536664 -1.34620529 -0.25535147 [13] 0.25737862 0.38347982 0.27738616 -0.53898635 -0.41826148 0.15983961 [19] 0.69545875 -0.56134139 0.61703579 -0.45053587 1.63628918 -0.40298012 [25] -0.15093756 -1.14707729 -0.02268810 1.15853871 -1.21411861 2.22352794 [31] -1.22190026 1.14416213 -1.80551914 0.28287263 -0.05834867 -0.80278809 [37] 0.08753834 -0.38692831 0.56247671 0.05001124 -0.93983988 -0.28965555 [43] 0.71894614 -0.28706505 -0.92247681 -0.14457708 -0.59800235 0.35255720 [49] 0.12236206 1.07343760 -2.12564016 2.63519843 0.42634753 0.29254620 [55] 0.47028695 1.34534224 -1.83483151 -1.11027645 0.51969192 -0.51935745 [61] -0.40755711 -0.21171355 -1.07816164 1.30589113 1.26524497 -2.11063255 [67] -0.93983748 0.92849508 -0.73808193 -1.66686532 -0.22000840 0.31930451 [73] 0.20524848 -0.48266692 -0.19435965 -0.10912142 -0.02460686 0.06326153 [79] -0.58016902 -1.73164419 0.61185939 -0.99534019 1.16105247 -1.09734636 [85] 0.43146444 0.81192421 0.70198011 1.00550041 0.28548387 -0.13079575 [91] 0.80311059 0.03769102 -0.08395802 -0.26653887 1.24718659 0.83561263 [97] -0.31025307 0.97076303 1.22685018 0.59936049 > rowMin(tmp2) [1] 0.73530871 0.19270286 -0.40815575 -0.77464997 -1.43495150 -1.10269739 [7] -0.15237833 1.52198220 -0.89135967 -1.51536664 -1.34620529 -0.25535147 [13] 0.25737862 0.38347982 0.27738616 -0.53898635 -0.41826148 0.15983961 [19] 0.69545875 -0.56134139 0.61703579 -0.45053587 1.63628918 -0.40298012 [25] -0.15093756 -1.14707729 -0.02268810 1.15853871 -1.21411861 2.22352794 [31] -1.22190026 1.14416213 -1.80551914 0.28287263 -0.05834867 -0.80278809 [37] 0.08753834 -0.38692831 0.56247671 0.05001124 -0.93983988 -0.28965555 [43] 0.71894614 -0.28706505 -0.92247681 -0.14457708 -0.59800235 0.35255720 [49] 0.12236206 1.07343760 -2.12564016 2.63519843 0.42634753 0.29254620 [55] 0.47028695 1.34534224 -1.83483151 -1.11027645 0.51969192 -0.51935745 [61] -0.40755711 -0.21171355 -1.07816164 1.30589113 1.26524497 -2.11063255 [67] -0.93983748 0.92849508 -0.73808193 -1.66686532 -0.22000840 0.31930451 [73] 0.20524848 -0.48266692 -0.19435965 -0.10912142 -0.02460686 0.06326153 [79] -0.58016902 -1.73164419 0.61185939 -0.99534019 1.16105247 -1.09734636 [85] 0.43146444 0.81192421 0.70198011 1.00550041 0.28548387 -0.13079575 [91] 0.80311059 0.03769102 -0.08395802 -0.26653887 1.24718659 0.83561263 [97] -0.31025307 0.97076303 1.22685018 0.59936049 > > colMeans(tmp2) [1] -0.04454917 > colSums(tmp2) [1] -4.454917 > colVars(tmp2) [1] 0.8722238 > colSd(tmp2) [1] 0.9339292 > colMax(tmp2) [1] 2.635198 > colMin(tmp2) [1] -2.12564 > colMedians(tmp2) [1] -0.07115335 > colRanges(tmp2) [,1] [1,] -2.125640 [2,] 2.635198 > > 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.2265903 0.4105731 1.1004985 -2.8872564 0.8195238 3.8984882 [7] -2.1494164 3.3719516 -4.8694618 -1.5097315 > colApply(tmp,quantile)[,1] [,1] [1,] -2.5166703 [2,] -0.8941968 [3,] -0.2376850 [4,] 0.2245604 [5,] 2.1405223 > > rowApply(tmp,sum) [1] 1.29496721 -0.62640441 1.52883873 -0.32748368 -5.97234148 -0.11781008 [7] 0.05762038 -2.47148961 1.84703008 0.74565154 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 1 1 10 9 5 1 5 1 6 [2,] 7 9 3 2 1 9 9 8 8 7 [3,] 6 5 10 7 4 1 3 6 6 8 [4,] 3 7 8 4 2 4 7 4 2 1 [5,] 5 10 5 1 10 3 5 10 5 5 [6,] 8 8 9 6 5 7 6 7 10 4 [7,] 2 2 4 9 6 2 8 3 3 9 [8,] 4 6 6 3 8 10 4 9 7 10 [9,] 1 3 7 8 3 8 2 1 9 2 [10,] 9 4 2 5 7 6 10 2 4 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.98880371 -0.24780641 0.11768455 2.29902773 1.80725362 1.13170831 [7] -1.70952386 0.18357951 2.07463304 0.34235716 -3.57191176 0.01735805 [13] -1.82757714 -2.55497423 -1.33081210 1.16336838 1.64265013 2.67089505 [19] 2.12522605 -3.22403834 > colApply(tmp,quantile)[,1] [,1] [1,] -0.5593250 [2,] -0.5400562 [3,] -0.3403565 [4,] -0.2930211 [5,] 0.7439552 > > rowApply(tmp,sum) [1] 5.920772 -1.211232 -1.280341 -1.245409 -2.063496 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 6 9 17 8 7 [2,] 4 19 16 2 9 [3,] 7 2 3 18 18 [4,] 9 4 20 20 12 [5,] 20 1 19 11 15 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2930211 -0.5952918 -0.1671074 -0.1123203 1.97386202 0.85161160 [2,] -0.3403565 1.6627639 -1.0806426 -0.9031640 -1.29510652 -0.44522865 [3,] 0.7439552 0.6735906 -0.9877880 1.3172333 0.82180781 0.05599148 [4,] -0.5593250 -1.5590107 1.4225571 2.1865829 0.04878496 0.59205842 [5,] -0.5400562 -0.4298584 0.9306654 -0.1893041 0.25790535 0.07727546 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.1717914 0.9656166197 0.5812212 -0.1136215 -0.3630920 1.5715073 [2,] -0.3057347 -0.9299330863 0.7318133 0.3900203 -0.7046588 -0.5754102 [3,] -1.1617467 0.0008768219 -0.9315476 -0.3203219 -0.3549559 0.2208071 [4,] -0.7596701 0.6876350849 0.8320517 0.5837612 -1.3607691 -0.3166048 [5,] -0.6541637 -0.5406159261 0.8610944 -0.1974810 -0.7884360 -0.8829414 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.7184537 0.32223905 1.4339068 0.1193312 -1.0422232 -1.2608273 [2,] 0.3410825 0.64522514 0.4665418 1.8749527 -0.1756194 -0.0912117 [3,] -0.9078894 -1.29258322 -0.7034964 0.3903061 0.1459701 0.7571058 [4,] -1.4869916 -2.19035816 -1.2628967 0.8512400 0.4530572 2.0586674 [5,] -0.4922323 -0.03949704 -1.2648676 -2.0724616 2.2614653 1.2071610 [,19] [,20] [1,] 1.1417652 -0.983029345 [2,] 0.4068097 -0.883375200 [3,] 0.2613986 -0.009054406 [4,] -0.5130001 -0.953178870 [5,] 0.8282526 -0.395400523 > > > 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.20-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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 624 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 543 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.8105879 0.5748729 -0.7749784 -0.8024586 0.9639239 -0.4707242 -0.5367469 col8 col9 col10 col11 col12 col13 col14 row1 0.4000564 0.2226269 0.2165649 -0.2191095 1.470448 -0.02508773 -1.464714 col15 col16 col17 col18 col19 col20 row1 -0.7743555 -0.8539519 -0.1292677 1.599655 -0.2043155 -1.26553 > tmp[,"col10"] col10 row1 0.2165649 row2 1.6553817 row3 1.2728063 row4 -1.7095752 row5 -0.3558443 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.8105879 0.5748729 -0.7749784 -0.8024586 0.9639239 -0.4707242 row5 -0.8943454 -0.8507069 0.2179130 0.2527448 0.2636188 0.3068999 col7 col8 col9 col10 col11 col12 row1 -0.5367469 0.4000564 0.2226269 0.2165649 -0.21910955 1.4704481 row5 -1.5037202 0.2405709 -0.3908331 -0.3558443 -0.02119695 0.2659117 col13 col14 col15 col16 col17 col18 row1 -0.02508773 -1.464714 -0.7743555 -0.8539519 -0.1292677 1.5996550 row5 -1.79267793 -0.579026 -0.4380170 -0.6616328 0.5961276 -0.9247477 col19 col20 row1 -0.2043155 -1.2655304 row5 1.9684644 0.4756782 > tmp[,c("col6","col20")] col6 col20 row1 -0.47072419 -1.2655304 row2 -0.02950413 -0.5900615 row3 0.98628399 -1.3708681 row4 -2.36628611 -2.2434055 row5 0.30689989 0.4756782 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.4707242 -1.2655304 row5 0.3068999 0.4756782 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.34713 49.14737 48.81995 49.21714 50.63448 105.1567 51.43557 50.94708 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.59724 51.9099 49.56892 49.35745 49.92136 49.99547 50.75883 50.67515 col17 col18 col19 col20 row1 48.49017 50.99009 48.0191 104.0787 > tmp[,"col10"] col10 row1 51.90990 row2 29.63918 row3 31.19315 row4 31.18195 row5 50.76630 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.34713 49.14737 48.81995 49.21714 50.63448 105.1567 51.43557 50.94708 row5 50.02957 48.73251 49.22460 47.66601 51.95866 104.5075 50.31180 50.43463 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.59724 51.9099 49.56892 49.35745 49.92136 49.99547 50.75883 50.67515 row5 49.94627 50.7663 49.44234 49.01031 49.14788 50.47501 50.05508 50.09012 col17 col18 col19 col20 row1 48.49017 50.99009 48.01910 104.0787 row5 50.44721 48.86849 48.90331 105.0135 > tmp[,c("col6","col20")] col6 col20 row1 105.15667 104.07875 row2 75.55830 73.16406 row3 75.25795 75.27618 row4 75.60432 76.34218 row5 104.50747 105.01346 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.1567 104.0787 row5 104.5075 105.0135 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.1567 104.0787 row5 104.5075 105.0135 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.09940114 [2,] 0.82794172 [3,] -0.26503213 [4,] -0.07637228 [5,] 0.47655612 > tmp[,c("col17","col7")] col17 col7 [1,] 1.6202012 -0.11459916 [2,] -2.0369700 0.44403136 [3,] -0.5414550 -1.02581929 [4,] -0.3452507 0.04850731 [5,] -0.6937148 -0.41015021 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.0055535 -1.0125257 [2,] -0.4459841 -1.1790118 [3,] -1.4308962 -0.5166429 [4,] -1.0734244 0.1928292 [5,] -0.8024996 -0.8774238 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.005554 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.0055535 [2,] -0.4459841 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -0.59737 -0.2277559 -0.5464294 -2.0589093 0.2288882 -1.178270 -2.9655792 row1 1.23720 0.8591137 0.2866081 0.9504292 1.4334340 -1.497769 -0.6914583 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -2.792050 0.7125751 0.2284069 -0.8608424 -0.08814719 0.5087367 1.425417 row1 -1.575601 1.2747371 -0.7629260 -0.2422819 -0.17322401 -1.0308784 -0.869117 [,15] [,16] [,17] [,18] [,19] [,20] row3 1.632274 -0.7976661 -1.1234758 -0.8502684 -0.111706 0.6565521 row1 1.455372 0.6285870 -0.0777172 0.4191052 -0.513152 1.0739217 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.8617545 -2.695165 0.06408412 1.062148 -1.400296 -0.7957267 1.10151 [,8] [,9] [,10] row2 -0.1864005 1.530784 0.5222413 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.9284047 -0.5498501 -0.1783822 -0.3087832 -0.5948391 0.06941304 -0.59818 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.54901 0.6498924 -1.234239 0.006828577 -1.885465 0.5738411 0.8065395 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.696234 -1.929803 1.587927 0.4736345 -0.5352108 -0.7028825 > > > 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: 0x00000228a2cffdd0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32943f89424e" [2] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3294172b2401" [3] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3294326d22d4" [4] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3294f481edc" [5] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32947824e0" [6] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32942e8a352b" [7] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32941b9b29c6" [8] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM329469821f88" [9] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM329441f560a2" [10] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3294386c491" [11] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM329418c9589c" [12] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM329430617d48" [13] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3294c1e686a" [14] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32943cce38ba" [15] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM32947ae16f17" > > > ### 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: 0x00000228a51ff110> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x00000228a51ff110> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.20-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x00000228a51ff110> > rowMedians(tmp) [1] -0.4393780410 -0.0048132771 -0.0350632292 -0.2395488101 -0.0958453859 [6] 0.1830304659 0.4894973990 0.5616497907 -0.3084976910 -0.0111419116 [11] 0.3570316616 -0.1634902387 0.3050774503 0.3997606375 -0.3671109356 [16] -0.0321559646 -0.0077599570 -0.0704252713 0.1980828355 -0.5640141076 [21] 0.5897478557 -0.4625466412 0.3463835941 -0.1716246391 0.3467343014 [26] -0.2240240217 -0.1344444401 0.0696780097 0.2899123148 -0.2096112685 [31] 0.1484478115 0.1639040179 0.3375617669 -0.0362844354 0.3883576550 [36] 0.9593900221 0.5020117952 0.2715513016 0.1890902751 0.0465540250 [41] -0.0008490097 0.4896648278 -0.1570126341 -0.1562513591 -0.3763651564 [46] -0.3850683945 0.2170627295 0.0570052135 0.0745555220 0.0331975460 [51] -0.1406032227 0.3273619436 -0.6137428337 0.3395135392 -0.0204578909 [56] 0.2847150114 -0.3130511393 0.0711995634 -0.4865348687 0.0404004981 [61] -0.0897880874 -0.1714160165 -0.1263864268 -0.0803021349 0.5193558043 [66] 0.5430712006 0.4684083521 0.1323110147 -0.1949265824 -0.1155136264 [71] 0.5517437682 0.1443380895 0.1681780922 -0.1018154285 0.2310424827 [76] 0.1080469638 0.5922768429 -0.1982954688 0.1597303066 0.1940055356 [81] 0.0416198828 -0.2979167320 -0.1754362185 -0.0339521431 -0.0480718879 [86] -0.0484979173 -0.1497722571 0.4073246597 -0.2519374476 0.1583767916 [91] 0.4267880189 0.8416445809 -0.2065907686 0.2862137108 0.2506044508 [96] 0.3309209277 -0.2757581840 0.0210422280 -0.0959285258 -0.2128454508 [101] 0.1640646394 0.4582399625 -0.6277045285 0.1648207898 -0.2407093451 [106] 0.2455863773 0.1973589358 -0.0542932569 -0.0471541508 0.0659696189 [111] -0.0068227680 0.0607277604 0.4887002813 -0.0274169893 -0.4465535927 [116] -0.0789193919 0.1058063825 0.3099290403 0.0261173912 0.3457842395 [121] 0.0426031647 0.4383503528 -0.2685874505 -0.3692255095 -0.2191675216 [126] 0.1068052226 -0.0341255871 -0.4159585825 -0.0123229284 -0.6076161888 [131] 0.3934864966 -0.2259595820 0.0051483462 0.3078625155 0.1028675706 [136] 0.0325722384 -0.1441748189 0.2264102384 0.0323569987 0.5369815350 [141] 0.2238493051 0.0501390001 -0.0604386711 -0.1673225753 0.1041096905 [146] -0.5015159848 0.1336627211 0.0320379633 0.4108072788 -0.5311928960 [151] 0.0177148490 -0.2546197774 -0.0218667916 -0.3594034887 0.0452355159 [156] 0.0442372868 -0.5602040517 0.1883809212 0.0758961856 -0.6854098775 [161] 0.2410612115 0.4570542043 -0.3086143533 0.5159034059 0.1361066918 [166] 0.1430028180 0.0023649672 -0.2346801319 0.6336989841 0.4462841377 [171] 0.3428200323 0.3237581132 0.1934888319 -0.0287007983 -0.0045456438 [176] -0.0996160992 -0.1198313265 -0.3596460056 -0.3957373562 -0.8367039269 [181] 0.0806543145 -0.0333177730 -0.6413645370 0.2027646694 0.0277128439 [186] 0.2021804126 0.1677316920 0.2091573887 -0.3877830047 0.4551570158 [191] -0.3430616027 -0.3402548518 -0.1990180397 0.0304219948 -0.2820034291 [196] 0.3703592268 0.7160907599 -0.2713196547 0.0963567821 0.3553955620 [201] -0.0919442233 -0.1368178832 0.0180577648 -0.2456403122 -0.3676187890 [206] 0.5671972732 -0.0959815057 -0.2759940175 0.0430020848 -0.1893154225 [211] 0.1497976504 -0.2439741283 -0.2791862536 -0.0563488506 -0.3899358767 [216] 0.0648267336 0.0690235505 -0.3824110492 -0.2142000894 -0.0877866025 [221] -0.0908934977 -0.2715739529 -0.2181896905 -0.3438152826 0.2039770399 [226] -0.4003144991 0.0522083883 0.0968793844 0.2497930961 0.1186401980 > > proc.time() user system elapsed 3.56 17.82 33.14
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" 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: 0x000001aff66ff2f0> > .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: 0x000001aff66ff2f0> > .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: 0x000001aff66ff2f0> > .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: 0x000001aff66ff2f0> > 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: 0x000001aff66ff830> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff830> > .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: 0x000001aff66ff830> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff830> > .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: 0x000001aff66ff830> > 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: 0x000001aff66ff290> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff290> > .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: 0x000001aff66ff290> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001aff66ff290> > .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: 0x000001aff66ff290> > > .Call("R_bm_RowMode",P) <pointer: 0x000001aff66ff290> > .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: 0x000001aff66ff290> > > .Call("R_bm_ColMode",P) <pointer: 0x000001aff66ff290> > .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: 0x000001aff66ff290> > 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: 0x000001aff66ff3b0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001aff66ff3b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff3b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff3b0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3eac61aa480e" "BufferedMatrixFile3eac63987f87" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3eac61aa480e" "BufferedMatrixFile3eac63987f87" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ffbf0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ffbf0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001aff66ffbf0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001aff66ffbf0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001aff66ffbf0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001aff66ffbf0> > .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: 0x000001aff66ff890> > .Call("R_bm_AddColumn",P) <pointer: 0x000001aff66ff890> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001aff66ff890> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001aff66ff890> > 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: 0x000001aff5a7a710> > .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: 0x000001aff5a7a710> > rm(P) > > proc.time() user system elapsed 0.39 0.18 0.61
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" 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.29 0.07 0.32