Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-07-24 09:04 -0400 (Wed, 24 Jul 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4747 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4489 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4518 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4467 |
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 249/2300 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.68.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | 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.68.0 |
Command: E:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.19-bioc\R\library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz |
StartedAt: 2024-07-22 00:08:11 -0400 (Mon, 22 Jul 2024) |
EndedAt: 2024-07-22 00:10:30 -0400 (Mon, 22 Jul 2024) |
EllapsedTime: 139.2 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.19-bioc\R\library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'E:/biocbuild/bbs-3.19-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.68.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 'E:/biocbuild/bbs-3.19-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 'E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'E:/biocbuild/bbs-3.19-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 13.2.0' gcc -I"E:/biocbuild/bbs-3.19-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"E:/biocbuild/bbs-3.19-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"E:/biocbuild/bbs-3.19-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"E:/biocbuild/bbs-3.19-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 -LE:/biocbuild/bbs-3.19-bioc/R/bin/x64 -lR installing to E:/biocbuild/bbs-3.19-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.29 0.14 1.31
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] "E:/biocbuild/bbs-3.19-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 468463 25.1 1021760 54.6 633411 33.9 Vcells 853871 6.6 8388608 64.0 2003091 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 22 00:08:40 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 22 00:08: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: 0x000001c82bcffbf0> > > > > 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 22 00:09:04 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 22 00:09:11 2024" > > ColMode(tmp2) <pointer: 0x000001c82bcffbf0> > > > > ### 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.50248380 -1.2615168 -0.31989718 0.01782681 [2,] 1.11690766 1.1746786 -0.73011599 -0.08575189 [3,] -0.55332566 0.2247313 1.21729321 -0.23974299 [4,] -0.04090773 -1.1724328 0.03234405 1.23804824 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.19-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.50248380 1.2615168 0.31989718 0.01782681 [2,] 1.11690766 1.1746786 0.73011599 0.08575189 [3,] 0.55332566 0.2247313 1.21729321 0.23974299 [4,] 0.04090773 1.1724328 0.03234405 1.23804824 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.19-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.0250927 1.1231727 0.5655945 0.1335171 [2,] 1.0568385 1.0838259 0.8544682 0.2928342 [3,] 0.7438586 0.4740584 1.1033101 0.4896356 [4,] 0.2022566 1.0827894 0.1798445 1.1126762 > > 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: E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.75341 37.49324 30.97584 26.35300 [2,] 36.68529 37.01294 34.27480 28.01409 [3,] 32.99191 29.96531 37.25039 30.13610 [4,] 27.06347 37.00033 26.83079 37.36481 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001c82bcff050> > exp(tmp5) <pointer: 0x000001c82bcff050> > log(tmp5,2) <pointer: 0x000001c82bcff050> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.8761 > Min(tmp5) [1] 52.79766 > mean(tmp5) [1] 72.18104 > Sum(tmp5) [1] 14436.21 > Var(tmp5) [1] 878.6881 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.25029 71.42106 70.32297 71.68316 67.32177 68.81519 72.44588 71.88876 [9] 69.68853 67.97274 > rowSums(tmp5) [1] 1805.006 1428.421 1406.459 1433.663 1346.435 1376.304 1448.918 1437.775 [9] 1393.771 1359.455 > rowVars(tmp5) [1] 8078.37025 48.96699 73.15794 112.96351 62.39022 55.93988 [7] 134.40229 65.46271 73.12986 88.00779 > rowSd(tmp5) [1] 89.879754 6.997642 8.553242 10.628429 7.898748 7.479297 11.593200 [8] 8.090903 8.551600 9.381247 > rowMax(tmp5) [1] 469.87615 80.53231 88.66517 93.58944 80.73118 79.22606 93.79997 [8] 87.69930 88.70762 84.23824 > rowMin(tmp5) [1] 54.85031 58.30767 61.51343 52.90860 55.47431 56.28430 56.39210 59.10812 [9] 54.25965 52.79766 > > colMeans(tmp5) [1] 108.55244 67.25998 72.11588 65.18271 70.22485 69.46345 72.56811 [8] 72.82589 65.10672 66.09549 72.70736 73.91119 68.07058 72.26128 [15] 69.76628 73.97718 72.69284 69.84876 70.79817 70.19159 > colSums(tmp5) [1] 1085.5244 672.5998 721.1588 651.8271 702.2485 694.6345 725.6811 [8] 728.2589 651.0672 660.9549 727.0736 739.1119 680.7058 722.6128 [15] 697.6628 739.7718 726.9284 698.4876 707.9817 701.9159 > colVars(tmp5) [1] 16156.03521 62.46858 123.08493 74.14156 110.10593 41.88375 [7] 203.86516 146.89144 23.11604 81.54101 45.42761 39.93537 [13] 66.43906 42.11953 92.91703 111.36050 88.72014 47.34970 [19] 98.21831 66.77692 > colSd(tmp5) [1] 127.106393 7.903706 11.094365 8.610549 10.493137 6.471766 [7] 14.278136 12.119878 4.807915 9.030006 6.740001 6.319443 [13] 8.151016 6.489956 9.639348 10.552749 9.419137 6.881112 [19] 9.910515 8.171714 > colMax(tmp5) [1] 469.87615 78.03727 93.79997 78.44223 91.63588 82.16954 89.48955 [8] 93.58944 70.81645 80.69237 82.22411 83.19457 79.34339 79.63757 [15] 83.22336 87.32058 84.23824 80.39497 85.73266 80.23664 > colMin(tmp5) [1] 56.32907 58.28664 55.84477 54.85031 58.86643 58.44066 55.47431 58.62298 [9] 56.36661 53.95982 58.60891 63.21975 56.28430 65.48661 52.79766 54.25965 [17] 55.13161 60.78861 52.90860 58.81762 > > > ### 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.25029 NA 70.32297 71.68316 67.32177 68.81519 72.44588 71.88876 [9] 69.68853 67.97274 > rowSums(tmp5) [1] 1805.006 NA 1406.459 1433.663 1346.435 1376.304 1448.918 1437.775 [9] 1393.771 1359.455 > rowVars(tmp5) [1] 8078.37025 42.68436 73.15794 112.96351 62.39022 55.93988 [7] 134.40229 65.46271 73.12986 88.00779 > rowSd(tmp5) [1] 89.879754 6.533327 8.553242 10.628429 7.898748 7.479297 11.593200 [8] 8.090903 8.551600 9.381247 > rowMax(tmp5) [1] 469.87615 NA 88.66517 93.58944 80.73118 79.22606 93.79997 [8] 87.69930 88.70762 84.23824 > rowMin(tmp5) [1] 54.85031 NA 61.51343 52.90860 55.47431 56.28430 56.39210 59.10812 [9] 54.25965 52.79766 > > colMeans(tmp5) [1] 108.55244 67.25998 72.11588 65.18271 70.22485 69.46345 72.56811 [8] 72.82589 65.10672 66.09549 72.70736 73.91119 NA 72.26128 [15] 69.76628 73.97718 72.69284 69.84876 70.79817 70.19159 > colSums(tmp5) [1] 1085.5244 672.5998 721.1588 651.8271 702.2485 694.6345 725.6811 [8] 728.2589 651.0672 660.9549 727.0736 739.1119 NA 722.6128 [15] 697.6628 739.7718 726.9284 698.4876 707.9817 701.9159 > colVars(tmp5) [1] 16156.03521 62.46858 123.08493 74.14156 110.10593 41.88375 [7] 203.86516 146.89144 23.11604 81.54101 45.42761 39.93537 [13] NA 42.11953 92.91703 111.36050 88.72014 47.34970 [19] 98.21831 66.77692 > colSd(tmp5) [1] 127.106393 7.903706 11.094365 8.610549 10.493137 6.471766 [7] 14.278136 12.119878 4.807915 9.030006 6.740001 6.319443 [13] NA 6.489956 9.639348 10.552749 9.419137 6.881112 [19] 9.910515 8.171714 > colMax(tmp5) [1] 469.87615 78.03727 93.79997 78.44223 91.63588 82.16954 89.48955 [8] 93.58944 70.81645 80.69237 82.22411 83.19457 NA 79.63757 [15] 83.22336 87.32058 84.23824 80.39497 85.73266 80.23664 > colMin(tmp5) [1] 56.32907 58.28664 55.84477 54.85031 58.86643 58.44066 55.47431 58.62298 [9] 56.36661 53.95982 58.60891 63.21975 NA 65.48661 52.79766 54.25965 [17] 55.13161 60.78861 52.90860 58.81762 > > Max(tmp5,na.rm=TRUE) [1] 469.8761 > Min(tmp5,na.rm=TRUE) [1] 52.79766 > mean(tmp5,na.rm=TRUE) [1] 72.24721 > Sum(tmp5,na.rm=TRUE) [1] 14377.19 > Var(tmp5,na.rm=TRUE) [1] 882.2459 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.25029 72.07410 70.32297 71.68316 67.32177 68.81519 72.44588 71.88876 [9] 69.68853 67.97274 > rowSums(tmp5,na.rm=TRUE) [1] 1805.006 1369.408 1406.459 1433.663 1346.435 1376.304 1448.918 1437.775 [9] 1393.771 1359.455 > rowVars(tmp5,na.rm=TRUE) [1] 8078.37025 42.68436 73.15794 112.96351 62.39022 55.93988 [7] 134.40229 65.46271 73.12986 88.00779 > rowSd(tmp5,na.rm=TRUE) [1] 89.879754 6.533327 8.553242 10.628429 7.898748 7.479297 11.593200 [8] 8.090903 8.551600 9.381247 > rowMax(tmp5,na.rm=TRUE) [1] 469.87615 80.53231 88.66517 93.58944 80.73118 79.22606 93.79997 [8] 87.69930 88.70762 84.23824 > rowMin(tmp5,na.rm=TRUE) [1] 54.85031 58.30767 61.51343 52.90860 55.47431 56.28430 56.39210 59.10812 [9] 54.25965 52.79766 > > colMeans(tmp5,na.rm=TRUE) [1] 108.55244 67.25998 72.11588 65.18271 70.22485 69.46345 72.56811 [8] 72.82589 65.10672 66.09549 72.70736 73.91119 69.07694 72.26128 [15] 69.76628 73.97718 72.69284 69.84876 70.79817 70.19159 > colSums(tmp5,na.rm=TRUE) [1] 1085.5244 672.5998 721.1588 651.8271 702.2485 694.6345 725.6811 [8] 728.2589 651.0672 660.9549 727.0736 739.1119 621.6925 722.6128 [15] 697.6628 739.7718 726.9284 698.4876 707.9817 701.9159 > colVars(tmp5,na.rm=TRUE) [1] 16156.03521 62.46858 123.08493 74.14156 110.10593 41.88375 [7] 203.86516 146.89144 23.11604 81.54101 45.42761 39.93537 [13] 63.35037 42.11953 92.91703 111.36050 88.72014 47.34970 [19] 98.21831 66.77692 > colSd(tmp5,na.rm=TRUE) [1] 127.106393 7.903706 11.094365 8.610549 10.493137 6.471766 [7] 14.278136 12.119878 4.807915 9.030006 6.740001 6.319443 [13] 7.959294 6.489956 9.639348 10.552749 9.419137 6.881112 [19] 9.910515 8.171714 > colMax(tmp5,na.rm=TRUE) [1] 469.87615 78.03727 93.79997 78.44223 91.63588 82.16954 89.48955 [8] 93.58944 70.81645 80.69237 82.22411 83.19457 79.34339 79.63757 [15] 83.22336 87.32058 84.23824 80.39497 85.73266 80.23664 > colMin(tmp5,na.rm=TRUE) [1] 56.32907 58.28664 55.84477 54.85031 58.86643 58.44066 55.47431 58.62298 [9] 56.36661 53.95982 58.60891 63.21975 56.28430 65.48661 52.79766 54.25965 [17] 55.13161 60.78861 52.90860 58.81762 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.25029 NaN 70.32297 71.68316 67.32177 68.81519 72.44588 71.88876 [9] 69.68853 67.97274 > rowSums(tmp5,na.rm=TRUE) [1] 1805.006 0.000 1406.459 1433.663 1346.435 1376.304 1448.918 1437.775 [9] 1393.771 1359.455 > rowVars(tmp5,na.rm=TRUE) [1] 8078.37025 NA 73.15794 112.96351 62.39022 55.93988 [7] 134.40229 65.46271 73.12986 88.00779 > rowSd(tmp5,na.rm=TRUE) [1] 89.879754 NA 8.553242 10.628429 7.898748 7.479297 11.593200 [8] 8.090903 8.551600 9.381247 > rowMax(tmp5,na.rm=TRUE) [1] 469.87615 NA 88.66517 93.58944 80.73118 79.22606 93.79997 [8] 87.69930 88.70762 84.23824 > rowMin(tmp5,na.rm=TRUE) [1] 54.85031 NA 61.51343 52.90860 55.47431 56.28430 56.39210 59.10812 [9] 54.25965 52.79766 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.12986 66.17358 72.20225 65.94660 70.80350 69.75353 72.36050 [8] 73.62001 64.81890 64.52110 73.05550 74.32566 NaN 71.57164 [15] 68.65430 74.95962 73.33892 68.95536 69.71660 69.32518 > colSums(tmp5,na.rm=TRUE) [1] 1009.1688 595.5622 649.8203 593.5194 637.2315 627.7818 651.2445 [8] 662.5801 583.3701 580.6899 657.4995 668.9310 0.0000 644.1447 [15] 617.8887 674.6366 660.0503 620.5983 627.4494 623.9266 > colVars(tmp5,na.rm=TRUE) [1] 18031.56258 56.99917 138.38661 76.84451 120.10222 46.17256 [7] 228.86342 158.15820 25.07357 63.84830 49.74258 42.99464 [13] NA 42.03393 90.62111 114.42223 95.11421 44.28910 [19] 97.33538 66.67915 > colSd(tmp5,na.rm=TRUE) [1] 134.281654 7.549779 11.763784 8.766100 10.959116 6.795040 [7] 15.128233 12.576096 5.007352 7.990513 7.052842 6.557030 [13] NA 6.483358 9.519512 10.696833 9.752652 6.655006 [19] 9.865870 8.165730 > colMax(tmp5,na.rm=TRUE) [1] 469.87615 78.03727 93.79997 78.44223 91.63588 82.16954 89.48955 [8] 93.58944 70.81645 80.69237 82.22411 83.19457 -Inf 79.63757 [15] 83.22336 87.32058 84.23824 80.39497 85.73266 80.23664 > colMin(tmp5,na.rm=TRUE) [1] 56.32907 58.28664 55.84477 54.85031 58.86643 58.44066 55.47431 58.62298 [9] 56.36661 53.95982 58.60891 63.21975 Inf 65.48661 52.79766 54.25965 [17] 55.13161 60.78861 52.90860 58.81762 > > > > > 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] 161.9454 139.2034 262.5065 237.1008 216.8807 179.0727 178.0366 178.4470 [9] 286.7054 205.0229 > apply(copymatrix,1,var,na.rm=TRUE) [1] 161.9454 139.2034 262.5065 237.1008 216.8807 179.0727 178.0366 178.4470 [9] 286.7054 205.0229 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 0.000000e+00 -1.136868e-13 0.000000e+00 0.000000e+00 -5.684342e-14 [6] 1.136868e-13 0.000000e+00 -1.136868e-13 0.000000e+00 -1.136868e-13 [11] -8.526513e-14 5.684342e-14 -5.684342e-14 2.842171e-14 0.000000e+00 [16] 2.842171e-14 2.273737e-13 -5.684342e-14 -2.273737e-13 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) + } 10 11 3 14 9 20 5 10 6 7 2 4 2 8 9 11 1 11 6 7 5 11 3 1 7 12 10 8 5 9 1 2 2 10 8 2 2 17 5 12 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 3.15404 > Min(tmp) [1] -3.143151 > mean(tmp) [1] 0.0404416 > Sum(tmp) [1] 4.04416 > Var(tmp) [1] 1.147355 > > rowMeans(tmp) [1] 0.0404416 > rowSums(tmp) [1] 4.04416 > rowVars(tmp) [1] 1.147355 > rowSd(tmp) [1] 1.071147 > rowMax(tmp) [1] 3.15404 > rowMin(tmp) [1] -3.143151 > > colMeans(tmp) [1] 0.41523270 -0.20671191 1.17673713 -0.70521446 1.12724107 2.15395763 [7] 0.57913806 1.23679315 -1.46371821 -1.54714761 -1.08590158 0.33138048 [13] 0.75223718 0.74555943 1.80465589 -0.84524277 -0.39950831 1.28795798 [19] -1.28144694 -0.87952018 -1.88049120 0.11478426 0.63474630 -0.64313329 [25] -0.64019771 -0.40917446 -0.09183067 1.06912998 0.30635062 0.65002276 [31] 3.15404033 -0.60395673 -1.11661732 -0.58802147 -0.16540295 -0.16157389 [37] -0.23934355 1.25985863 0.84893779 0.33717425 1.34594619 -1.09122400 [43] -2.00147493 -0.53630930 0.06577128 0.22156247 -0.75474684 1.18630234 [49] 0.89110759 0.91134248 1.91837685 -1.52648884 -1.39868097 -0.25862935 [55] -0.24250198 -0.99596864 0.36910275 -0.75049674 -0.44601206 0.68844022 [61] 0.53806180 1.65619506 1.58849202 0.30611236 0.71962171 -3.14315143 [67] -0.24624642 -0.38132671 0.50595416 0.82904709 0.04364336 -1.17387119 [73] 0.25996424 -0.65321877 0.84860923 1.32249974 -0.69702871 -0.22222584 [79] 0.22650998 0.31916998 -0.65444608 1.48344955 -0.42865081 0.90444620 [85] 1.32085808 -2.97189685 -0.61880489 -0.16085885 -0.76492918 1.05071565 [91] -0.13038925 -0.39875063 -0.41217977 0.44857390 -0.45654341 0.20791402 [97] 1.58735173 0.56684375 0.21073001 -2.01328416 > colSums(tmp) [1] 0.41523270 -0.20671191 1.17673713 -0.70521446 1.12724107 2.15395763 [7] 0.57913806 1.23679315 -1.46371821 -1.54714761 -1.08590158 0.33138048 [13] 0.75223718 0.74555943 1.80465589 -0.84524277 -0.39950831 1.28795798 [19] -1.28144694 -0.87952018 -1.88049120 0.11478426 0.63474630 -0.64313329 [25] -0.64019771 -0.40917446 -0.09183067 1.06912998 0.30635062 0.65002276 [31] 3.15404033 -0.60395673 -1.11661732 -0.58802147 -0.16540295 -0.16157389 [37] -0.23934355 1.25985863 0.84893779 0.33717425 1.34594619 -1.09122400 [43] -2.00147493 -0.53630930 0.06577128 0.22156247 -0.75474684 1.18630234 [49] 0.89110759 0.91134248 1.91837685 -1.52648884 -1.39868097 -0.25862935 [55] -0.24250198 -0.99596864 0.36910275 -0.75049674 -0.44601206 0.68844022 [61] 0.53806180 1.65619506 1.58849202 0.30611236 0.71962171 -3.14315143 [67] -0.24624642 -0.38132671 0.50595416 0.82904709 0.04364336 -1.17387119 [73] 0.25996424 -0.65321877 0.84860923 1.32249974 -0.69702871 -0.22222584 [79] 0.22650998 0.31916998 -0.65444608 1.48344955 -0.42865081 0.90444620 [85] 1.32085808 -2.97189685 -0.61880489 -0.16085885 -0.76492918 1.05071565 [91] -0.13038925 -0.39875063 -0.41217977 0.44857390 -0.45654341 0.20791402 [97] 1.58735173 0.56684375 0.21073001 -2.01328416 > 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.41523270 -0.20671191 1.17673713 -0.70521446 1.12724107 2.15395763 [7] 0.57913806 1.23679315 -1.46371821 -1.54714761 -1.08590158 0.33138048 [13] 0.75223718 0.74555943 1.80465589 -0.84524277 -0.39950831 1.28795798 [19] -1.28144694 -0.87952018 -1.88049120 0.11478426 0.63474630 -0.64313329 [25] -0.64019771 -0.40917446 -0.09183067 1.06912998 0.30635062 0.65002276 [31] 3.15404033 -0.60395673 -1.11661732 -0.58802147 -0.16540295 -0.16157389 [37] -0.23934355 1.25985863 0.84893779 0.33717425 1.34594619 -1.09122400 [43] -2.00147493 -0.53630930 0.06577128 0.22156247 -0.75474684 1.18630234 [49] 0.89110759 0.91134248 1.91837685 -1.52648884 -1.39868097 -0.25862935 [55] -0.24250198 -0.99596864 0.36910275 -0.75049674 -0.44601206 0.68844022 [61] 0.53806180 1.65619506 1.58849202 0.30611236 0.71962171 -3.14315143 [67] -0.24624642 -0.38132671 0.50595416 0.82904709 0.04364336 -1.17387119 [73] 0.25996424 -0.65321877 0.84860923 1.32249974 -0.69702871 -0.22222584 [79] 0.22650998 0.31916998 -0.65444608 1.48344955 -0.42865081 0.90444620 [85] 1.32085808 -2.97189685 -0.61880489 -0.16085885 -0.76492918 1.05071565 [91] -0.13038925 -0.39875063 -0.41217977 0.44857390 -0.45654341 0.20791402 [97] 1.58735173 0.56684375 0.21073001 -2.01328416 > colMin(tmp) [1] 0.41523270 -0.20671191 1.17673713 -0.70521446 1.12724107 2.15395763 [7] 0.57913806 1.23679315 -1.46371821 -1.54714761 -1.08590158 0.33138048 [13] 0.75223718 0.74555943 1.80465589 -0.84524277 -0.39950831 1.28795798 [19] -1.28144694 -0.87952018 -1.88049120 0.11478426 0.63474630 -0.64313329 [25] -0.64019771 -0.40917446 -0.09183067 1.06912998 0.30635062 0.65002276 [31] 3.15404033 -0.60395673 -1.11661732 -0.58802147 -0.16540295 -0.16157389 [37] -0.23934355 1.25985863 0.84893779 0.33717425 1.34594619 -1.09122400 [43] -2.00147493 -0.53630930 0.06577128 0.22156247 -0.75474684 1.18630234 [49] 0.89110759 0.91134248 1.91837685 -1.52648884 -1.39868097 -0.25862935 [55] -0.24250198 -0.99596864 0.36910275 -0.75049674 -0.44601206 0.68844022 [61] 0.53806180 1.65619506 1.58849202 0.30611236 0.71962171 -3.14315143 [67] -0.24624642 -0.38132671 0.50595416 0.82904709 0.04364336 -1.17387119 [73] 0.25996424 -0.65321877 0.84860923 1.32249974 -0.69702871 -0.22222584 [79] 0.22650998 0.31916998 -0.65444608 1.48344955 -0.42865081 0.90444620 [85] 1.32085808 -2.97189685 -0.61880489 -0.16085885 -0.76492918 1.05071565 [91] -0.13038925 -0.39875063 -0.41217977 0.44857390 -0.45654341 0.20791402 [97] 1.58735173 0.56684375 0.21073001 -2.01328416 > colMedians(tmp) [1] 0.41523270 -0.20671191 1.17673713 -0.70521446 1.12724107 2.15395763 [7] 0.57913806 1.23679315 -1.46371821 -1.54714761 -1.08590158 0.33138048 [13] 0.75223718 0.74555943 1.80465589 -0.84524277 -0.39950831 1.28795798 [19] -1.28144694 -0.87952018 -1.88049120 0.11478426 0.63474630 -0.64313329 [25] -0.64019771 -0.40917446 -0.09183067 1.06912998 0.30635062 0.65002276 [31] 3.15404033 -0.60395673 -1.11661732 -0.58802147 -0.16540295 -0.16157389 [37] -0.23934355 1.25985863 0.84893779 0.33717425 1.34594619 -1.09122400 [43] -2.00147493 -0.53630930 0.06577128 0.22156247 -0.75474684 1.18630234 [49] 0.89110759 0.91134248 1.91837685 -1.52648884 -1.39868097 -0.25862935 [55] -0.24250198 -0.99596864 0.36910275 -0.75049674 -0.44601206 0.68844022 [61] 0.53806180 1.65619506 1.58849202 0.30611236 0.71962171 -3.14315143 [67] -0.24624642 -0.38132671 0.50595416 0.82904709 0.04364336 -1.17387119 [73] 0.25996424 -0.65321877 0.84860923 1.32249974 -0.69702871 -0.22222584 [79] 0.22650998 0.31916998 -0.65444608 1.48344955 -0.42865081 0.90444620 [85] 1.32085808 -2.97189685 -0.61880489 -0.16085885 -0.76492918 1.05071565 [91] -0.13038925 -0.39875063 -0.41217977 0.44857390 -0.45654341 0.20791402 [97] 1.58735173 0.56684375 0.21073001 -2.01328416 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.4152327 -0.2067119 1.176737 -0.7052145 1.127241 2.153958 0.5791381 [2,] 0.4152327 -0.2067119 1.176737 -0.7052145 1.127241 2.153958 0.5791381 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.236793 -1.463718 -1.547148 -1.085902 0.3313805 0.7522372 0.7455594 [2,] 1.236793 -1.463718 -1.547148 -1.085902 0.3313805 0.7522372 0.7455594 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.804656 -0.8452428 -0.3995083 1.287958 -1.281447 -0.8795202 -1.880491 [2,] 1.804656 -0.8452428 -0.3995083 1.287958 -1.281447 -0.8795202 -1.880491 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.1147843 0.6347463 -0.6431333 -0.6401977 -0.4091745 -0.09183067 1.06913 [2,] 0.1147843 0.6347463 -0.6431333 -0.6401977 -0.4091745 -0.09183067 1.06913 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.3063506 0.6500228 3.15404 -0.6039567 -1.116617 -0.5880215 -0.1654029 [2,] 0.3063506 0.6500228 3.15404 -0.6039567 -1.116617 -0.5880215 -0.1654029 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.1615739 -0.2393435 1.259859 0.8489378 0.3371742 1.345946 -1.091224 [2,] -0.1615739 -0.2393435 1.259859 0.8489378 0.3371742 1.345946 -1.091224 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -2.001475 -0.5363093 0.06577128 0.2215625 -0.7547468 1.186302 0.8911076 [2,] -2.001475 -0.5363093 0.06577128 0.2215625 -0.7547468 1.186302 0.8911076 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.9113425 1.918377 -1.526489 -1.398681 -0.2586293 -0.242502 -0.9959686 [2,] 0.9113425 1.918377 -1.526489 -1.398681 -0.2586293 -0.242502 -0.9959686 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.3691027 -0.7504967 -0.4460121 0.6884402 0.5380618 1.656195 1.588492 [2,] 0.3691027 -0.7504967 -0.4460121 0.6884402 0.5380618 1.656195 1.588492 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.3061124 0.7196217 -3.143151 -0.2462464 -0.3813267 0.5059542 0.8290471 [2,] 0.3061124 0.7196217 -3.143151 -0.2462464 -0.3813267 0.5059542 0.8290471 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.04364336 -1.173871 0.2599642 -0.6532188 0.8486092 1.3225 -0.6970287 [2,] 0.04364336 -1.173871 0.2599642 -0.6532188 0.8486092 1.3225 -0.6970287 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.2222258 0.22651 0.31917 -0.6544461 1.48345 -0.4286508 0.9044462 [2,] -0.2222258 0.22651 0.31917 -0.6544461 1.48345 -0.4286508 0.9044462 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.320858 -2.971897 -0.6188049 -0.1608589 -0.7649292 1.050716 -0.1303892 [2,] 1.320858 -2.971897 -0.6188049 -0.1608589 -0.7649292 1.050716 -0.1303892 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.3987506 -0.4121798 0.4485739 -0.4565434 0.207914 1.587352 0.5668438 [2,] -0.3987506 -0.4121798 0.4485739 -0.4565434 0.207914 1.587352 0.5668438 [,99] [,100] [1,] 0.21073 -2.013284 [2,] 0.21073 -2.013284 > > > Max(tmp2) [1] 3.442974 > Min(tmp2) [1] -2.040978 > mean(tmp2) [1] 0.1313001 > Sum(tmp2) [1] 13.13001 > Var(tmp2) [1] 0.8532839 > > rowMeans(tmp2) [1] -1.237601803 0.465923783 0.681289558 -0.205493426 0.335446091 [6] -0.973311457 0.450975040 -1.202837932 1.106118268 0.676217726 [11] -0.063836562 0.011787159 0.375619446 0.175227545 -0.543569244 [16] -0.004857332 0.193627456 0.491755099 0.317907641 -0.912609716 [21] 1.396403401 -0.339877932 -0.782391110 1.684811916 -1.730202384 [26] 0.394996696 -0.576438674 0.044797758 0.361145836 -0.448351250 [31] -0.052731104 0.606010399 -0.443559369 -0.443767563 -0.186291036 [36] -0.193369500 -1.195343634 -0.957163357 0.334840111 0.174075459 [41] 0.914297017 -0.433221958 1.281704237 -0.084727614 -0.912544511 [46] -0.532514301 1.550830427 1.938427865 1.834918233 0.067890080 [51] -0.440433673 0.472323636 -0.782481437 1.070149440 0.056039402 [56] -0.515993271 0.546643381 -0.944244355 -0.690090182 0.267374442 [61] -0.362059445 0.599480159 0.377664348 0.494039348 -0.579368902 [66] -0.845545101 -0.812226412 -0.091983466 1.016105891 0.630961828 [71] 1.658685239 -0.539369103 -0.925528751 1.359709199 1.647075393 [76] 0.562410017 -0.169413886 -0.438914589 0.836858857 3.442973768 [81] -0.411708134 0.325732318 -0.106118167 -0.349792066 0.950365555 [86] 0.770911466 -1.788476951 -2.040978036 1.117410748 -0.837215477 [91] -0.502511768 0.866968763 -0.081274675 1.706971889 0.021565107 [96] -0.711774257 2.120216320 0.025899124 1.352006188 0.390533930 > rowSums(tmp2) [1] -1.237601803 0.465923783 0.681289558 -0.205493426 0.335446091 [6] -0.973311457 0.450975040 -1.202837932 1.106118268 0.676217726 [11] -0.063836562 0.011787159 0.375619446 0.175227545 -0.543569244 [16] -0.004857332 0.193627456 0.491755099 0.317907641 -0.912609716 [21] 1.396403401 -0.339877932 -0.782391110 1.684811916 -1.730202384 [26] 0.394996696 -0.576438674 0.044797758 0.361145836 -0.448351250 [31] -0.052731104 0.606010399 -0.443559369 -0.443767563 -0.186291036 [36] -0.193369500 -1.195343634 -0.957163357 0.334840111 0.174075459 [41] 0.914297017 -0.433221958 1.281704237 -0.084727614 -0.912544511 [46] -0.532514301 1.550830427 1.938427865 1.834918233 0.067890080 [51] -0.440433673 0.472323636 -0.782481437 1.070149440 0.056039402 [56] -0.515993271 0.546643381 -0.944244355 -0.690090182 0.267374442 [61] -0.362059445 0.599480159 0.377664348 0.494039348 -0.579368902 [66] -0.845545101 -0.812226412 -0.091983466 1.016105891 0.630961828 [71] 1.658685239 -0.539369103 -0.925528751 1.359709199 1.647075393 [76] 0.562410017 -0.169413886 -0.438914589 0.836858857 3.442973768 [81] -0.411708134 0.325732318 -0.106118167 -0.349792066 0.950365555 [86] 0.770911466 -1.788476951 -2.040978036 1.117410748 -0.837215477 [91] -0.502511768 0.866968763 -0.081274675 1.706971889 0.021565107 [96] -0.711774257 2.120216320 0.025899124 1.352006188 0.390533930 > 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] -1.237601803 0.465923783 0.681289558 -0.205493426 0.335446091 [6] -0.973311457 0.450975040 -1.202837932 1.106118268 0.676217726 [11] -0.063836562 0.011787159 0.375619446 0.175227545 -0.543569244 [16] -0.004857332 0.193627456 0.491755099 0.317907641 -0.912609716 [21] 1.396403401 -0.339877932 -0.782391110 1.684811916 -1.730202384 [26] 0.394996696 -0.576438674 0.044797758 0.361145836 -0.448351250 [31] -0.052731104 0.606010399 -0.443559369 -0.443767563 -0.186291036 [36] -0.193369500 -1.195343634 -0.957163357 0.334840111 0.174075459 [41] 0.914297017 -0.433221958 1.281704237 -0.084727614 -0.912544511 [46] -0.532514301 1.550830427 1.938427865 1.834918233 0.067890080 [51] -0.440433673 0.472323636 -0.782481437 1.070149440 0.056039402 [56] -0.515993271 0.546643381 -0.944244355 -0.690090182 0.267374442 [61] -0.362059445 0.599480159 0.377664348 0.494039348 -0.579368902 [66] -0.845545101 -0.812226412 -0.091983466 1.016105891 0.630961828 [71] 1.658685239 -0.539369103 -0.925528751 1.359709199 1.647075393 [76] 0.562410017 -0.169413886 -0.438914589 0.836858857 3.442973768 [81] -0.411708134 0.325732318 -0.106118167 -0.349792066 0.950365555 [86] 0.770911466 -1.788476951 -2.040978036 1.117410748 -0.837215477 [91] -0.502511768 0.866968763 -0.081274675 1.706971889 0.021565107 [96] -0.711774257 2.120216320 0.025899124 1.352006188 0.390533930 > rowMin(tmp2) [1] -1.237601803 0.465923783 0.681289558 -0.205493426 0.335446091 [6] -0.973311457 0.450975040 -1.202837932 1.106118268 0.676217726 [11] -0.063836562 0.011787159 0.375619446 0.175227545 -0.543569244 [16] -0.004857332 0.193627456 0.491755099 0.317907641 -0.912609716 [21] 1.396403401 -0.339877932 -0.782391110 1.684811916 -1.730202384 [26] 0.394996696 -0.576438674 0.044797758 0.361145836 -0.448351250 [31] -0.052731104 0.606010399 -0.443559369 -0.443767563 -0.186291036 [36] -0.193369500 -1.195343634 -0.957163357 0.334840111 0.174075459 [41] 0.914297017 -0.433221958 1.281704237 -0.084727614 -0.912544511 [46] -0.532514301 1.550830427 1.938427865 1.834918233 0.067890080 [51] -0.440433673 0.472323636 -0.782481437 1.070149440 0.056039402 [56] -0.515993271 0.546643381 -0.944244355 -0.690090182 0.267374442 [61] -0.362059445 0.599480159 0.377664348 0.494039348 -0.579368902 [66] -0.845545101 -0.812226412 -0.091983466 1.016105891 0.630961828 [71] 1.658685239 -0.539369103 -0.925528751 1.359709199 1.647075393 [76] 0.562410017 -0.169413886 -0.438914589 0.836858857 3.442973768 [81] -0.411708134 0.325732318 -0.106118167 -0.349792066 0.950365555 [86] 0.770911466 -1.788476951 -2.040978036 1.117410748 -0.837215477 [91] -0.502511768 0.866968763 -0.081274675 1.706971889 0.021565107 [96] -0.711774257 2.120216320 0.025899124 1.352006188 0.390533930 > > colMeans(tmp2) [1] 0.1313001 > colSums(tmp2) [1] 13.13001 > colVars(tmp2) [1] 0.8532839 > colSd(tmp2) [1] 0.9237337 > colMax(tmp2) [1] 3.442974 > colMin(tmp2) [1] -2.040978 > colMedians(tmp2) [1] 0.03534844 > colRanges(tmp2) [,1] [1,] -2.040978 [2,] 3.442974 > > 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.6969811 -0.2373589 0.5880978 -4.4389097 -1.4067594 -1.0974492 [7] 0.6361516 2.4315030 -1.4312333 -7.3196412 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2838649 [2,] -1.1286862 [3,] -0.7809739 [4,] 0.3483098 [5,] 2.0198897 > > rowApply(tmp,sum) [1] 0.09991661 2.01154307 -0.66970372 -0.67690916 1.16706443 -2.13956006 [7] -3.96409684 -0.63045821 -6.97463623 -3.19574040 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 6 2 10 8 2 1 7 2 3 [2,] 3 5 1 7 6 8 7 9 7 7 [3,] 1 1 5 6 9 10 10 4 10 6 [4,] 8 3 9 2 4 1 8 3 3 5 [5,] 4 9 8 4 10 3 3 5 9 4 [6,] 10 2 7 3 1 5 9 10 4 8 [7,] 7 8 10 8 3 7 4 1 5 9 [8,] 6 10 4 5 7 9 6 8 1 10 [9,] 5 7 6 9 5 6 5 6 8 1 [10,] 9 4 3 1 2 4 2 2 6 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.53632019 0.53445584 -0.86395664 3.09535930 2.11433367 -0.09894195 [7] 4.62162687 -0.83937085 -3.41541658 0.12595763 -0.64652224 1.01713494 [13] -0.66082570 0.69768588 -4.24741846 2.37791773 -2.13001778 0.46890427 [19] 1.20310472 0.02654267 > colApply(tmp,quantile)[,1] [,1] [1,] -0.8090056 [2,] -0.2208729 [3,] 0.2247584 [4,] 1.0260103 [5,] 1.3154299 > > rowApply(tmp,sum) [1] -4.274889 3.042656 4.914530 6.997869 -5.763292 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 18 3 8 18 [2,] 13 9 6 7 17 [3,] 7 2 11 16 13 [4,] 8 19 16 13 19 [5,] 14 11 7 17 16 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2208729 0.3696365 -0.9890676 -0.8590165 0.4401668 -1.2848987 [2,] 1.3154299 -0.1224655 -1.4024843 1.3563556 0.2099383 0.7490096 [3,] -0.8090056 -0.5826234 0.4734842 1.0833632 -0.1649130 1.3676317 [4,] 0.2247584 0.1610094 1.0682711 0.4634249 1.0686991 0.3933766 [5,] 1.0260103 0.7088988 -0.0141601 1.0512321 0.5604424 -1.3240611 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -2.0004380 -0.5409791 -2.070202622 0.5355267 0.1337782 1.6464671 [2,] 0.9706716 -0.1406982 0.005215622 -0.3907029 -1.2242140 1.1828519 [3,] 2.8254829 1.1202030 -2.055534751 1.2198505 -0.7302226 -0.1227040 [4,] 1.0634797 -0.9322987 0.362832957 -0.1132415 1.4067759 -0.4137778 [5,] 1.7624306 -0.3455979 0.342272212 -1.1254751 -0.2326397 -1.2757023 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.7640711 1.00380929 -1.2061566 2.32415937 -1.7714946 -1.11918575 [2,] -0.2954818 1.93961271 -1.5364280 -1.15000697 -0.1296563 0.57962121 [3,] 0.2816533 -0.02036398 -1.2731677 1.00478465 0.6247375 0.80417115 [4,] 1.4519316 -0.08508865 0.3106475 0.26824497 0.4982944 -0.08211819 [5,] -1.3348577 -2.14028350 -0.5423138 -0.06926429 -1.3518988 0.28641585 [,19] [,20] [1,] 1.6550935 0.4428567 [2,] 0.3571634 0.7689236 [3,] -0.6900360 0.5577385 [4,] 1.1792428 -1.2965952 [5,] -1.2983590 -0.4463809 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.19-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: E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 625 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 542 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 1.583653 0.2097999 0.3994065 0.009386001 0.2397605 -1.887556 -0.1231992 col8 col9 col10 col11 col12 col13 col14 row1 -2.339925 0.7384745 -0.6485409 1.353821 0.4279365 0.2131167 2.84979 col15 col16 col17 col18 col19 col20 row1 -0.9924144 0.1534983 0.2385421 2.015793 -0.3937902 -0.06723601 > tmp[,"col10"] col10 row1 -0.64854095 row2 0.03346445 row3 -1.67930971 row4 0.50962612 row5 0.66014732 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.583653 0.2097999 0.3994065 0.009386001 0.2397605 -1.887556 -0.1231992 row5 -1.029989 0.3084976 0.7360204 -1.491418893 -0.1659534 1.078709 -0.8858474 col8 col9 col10 col11 col12 col13 col14 row1 -2.339925 0.7384745 -0.6485409 1.3538213 0.4279365 0.2131167 2.8497900 row5 1.169571 -0.9148629 0.6601473 0.7862101 0.7126815 -0.6520410 0.5893312 col15 col16 col17 col18 col19 col20 row1 -0.9924144 0.1534983 0.2385421 2.0157930 -0.3937902 -0.06723601 row5 -1.8692810 -1.8148507 -1.1988967 0.8016222 0.1154183 -0.39704076 > tmp[,c("col6","col20")] col6 col20 row1 -1.8875557 -0.06723601 row2 2.3080239 0.91919650 row3 -0.4963229 -1.77645387 row4 -1.3707813 -0.03214831 row5 1.0787095 -0.39704076 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.887556 -0.06723601 row5 1.078709 -0.39704076 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.35525 50.3826 49.56746 50.74951 49.6581 105.7702 50.78023 50.00242 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.04003 49.71665 50.62691 50.19935 51.13912 50.15291 49.71752 50.01001 col17 col18 col19 col20 row1 51.00162 50.12199 50.09983 104.9042 > tmp[,"col10"] col10 row1 49.71665 row2 28.56643 row3 29.60419 row4 29.74003 row5 50.20870 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.35525 50.38260 49.56746 50.74951 49.65810 105.7702 50.78023 50.00242 row5 51.31836 51.23083 50.15176 50.20719 49.55565 105.4105 48.58080 50.70629 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.04003 49.71665 50.62691 50.19935 51.13912 50.15291 49.71752 50.01001 row5 50.33231 50.20870 50.93850 49.59769 50.11837 51.05790 48.93294 50.53120 col17 col18 col19 col20 row1 51.00162 50.12199 50.09983 104.9042 row5 48.55244 51.07589 50.16395 104.4482 > tmp[,c("col6","col20")] col6 col20 row1 105.77017 104.90417 row2 74.86749 74.42550 row3 75.64308 74.84346 row4 75.63174 74.53833 row5 105.41049 104.44822 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.7702 104.9042 row5 105.4105 104.4482 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.7702 104.9042 row5 105.4105 104.4482 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.13003979 [2,] 0.06382124 [3,] 1.19031826 [4,] 0.39836626 [5,] -1.51336099 > tmp[,c("col17","col7")] col17 col7 [1,] -1.0230378 -0.4829895 [2,] 1.4654316 -0.7225595 [3,] 0.3085421 -0.8439569 [4,] 0.5054814 -0.7394866 [5,] 0.5063754 0.5947704 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.7271129 -0.1342786 [2,] 1.7509924 -0.4100019 [3,] 0.1413806 1.7501345 [4,] 0.9388816 1.3582014 [5,] 0.4018896 -1.3969941 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.7271129 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.7271129 [2,] 1.7509924 > > > > 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.2472701 0.2655182 0.8632107 0.4172603 -0.7774138 -0.4225703 -1.5517258 row1 -0.3223807 2.2911208 -0.3481330 1.6186667 1.5108917 -0.1320891 -0.8699786 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.9938167 -0.4561556 2.05822591 -1.3180797 -0.5954547 -0.14445288 row1 0.2963127 -0.2306441 -0.08303338 -0.3503042 -1.4793906 -0.08950538 [,14] [,15] [,16] [,17] [,18] [,19] row3 1.972299 -1.08380781 -1.620834 1.8180393 -0.7878045 0.005743643 row1 -1.919356 0.03363366 -1.446543 -0.1971813 -0.3954846 -1.021404802 [,20] row3 0.7178275 row1 0.5437923 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.5123825 0.6759212 -0.1945529 -0.6421983 -1.83645 2.36926 -0.567586 [,8] [,9] [,10] row2 -0.2397717 0.4127678 -1.769098 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.3261835 0.06835476 -0.8072794 -0.4888475 1.503972 -0.6268643 -0.5107326 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.5225095 -1.320685 0.1120061 -1.933345 1.164372 1.338813 1.037152 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.1710019 0.2596998 -0.5114969 -1.197447 -1.253589 -0.6643243 > > > 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: 0x000001c82bcffe90> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a64e1a7abe" [2] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a64260d211a" [3] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a646f2269b" [4] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a64117f7ae8" [5] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a64695d6320" [6] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a6416e3727" [7] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a647a57679" [8] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a646c834883" [9] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a6429185cce" [10] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a6467b92185" [11] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a643e693b17" [12] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a64746a7e09" [13] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a6435537432" [14] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a6425d130f3" [15] "E:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM3a642f7f1432" > > > ### 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: 0x000001c82e9ffb30> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001c82e9ffb30> Warning message: In dir.create(new.directory) : 'E:\biocbuild\bbs-3.19-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001c82e9ffb30> > rowMedians(tmp) [1] -0.0877838681 -0.0455604728 -0.1667662463 -0.1348953394 0.1999090791 [6] -0.1647612203 0.1960951818 0.2881281587 0.5371339655 0.2872957918 [11] -0.7446789904 0.0462829950 -0.1620090558 -0.1837990796 -0.2054907139 [16] 0.2313232167 0.2456206576 0.0377248911 -0.4443426461 0.2291261488 [21] 0.0128261225 0.2393735502 0.1644394718 -0.3715854950 -0.4238183896 [26] -0.3921161416 -0.3482745599 0.3283806601 0.2260820790 0.2592749039 [31] -0.4954754357 0.2119286163 -0.3576256810 0.2903748667 0.3163301860 [36] 0.4901185295 0.1533638764 -0.1129738963 -0.2752506404 0.2815583437 [41] -0.2855179775 0.1118751567 0.0881290714 -0.0651739839 0.1211997920 [46] 0.3861472331 -0.0067205347 -0.0856568900 0.4331397587 0.0346480139 [51] 0.3613997777 -0.3110032284 -0.4780383922 -0.6901240747 -0.1243619416 [56] 0.0517967910 0.4167630379 -0.0053078527 -0.4725330816 -0.5141565362 [61] -0.6500698533 -0.1290516963 -0.2541233929 0.2481390098 0.0903151534 [66] -0.1171552223 0.3435415012 -0.0246733932 0.3468839740 0.1693256804 [71] -0.2248226858 0.0995259841 -0.2954583965 0.5662576111 -0.1001974122 [76] 0.2403203367 0.1772048586 -0.1476347653 0.0264256529 -0.1763432011 [81] 0.1895616552 -0.3537546052 -0.4054062749 -0.0120292370 0.2157468830 [86] 0.2892878621 0.0336031049 -0.0679044823 0.0129774478 -0.0050688810 [91] -0.0603897052 0.0472338230 0.3821839661 -0.0245634789 -0.1984222007 [96] 0.4113685277 -0.4700027030 0.0762868947 0.8182912096 0.0125511439 [101] 0.0504858105 -0.1132980306 -0.8036966981 -0.5418300600 -0.1798834021 [106] -0.3626767742 0.6164467231 -0.6394558051 0.2591713468 -0.7097004426 [111] 0.4507283145 -0.0719083289 -0.1326863050 -0.3169975120 0.2236009105 [116] -0.0624634225 1.0412848584 -0.0160569904 0.0803118982 -0.1434366629 [121] 0.1306810640 -0.3530760547 0.0407957508 0.1240905895 0.3789113143 [126] -0.3628200482 -0.0358887210 -0.0123956281 0.3433239338 -0.5880212550 [131] -0.4281747044 -0.5180955970 -0.0038431727 -0.0427112399 0.0237128209 [136] 0.3616546612 0.4368424127 0.2420883311 0.4090625837 0.0728326598 [141] 0.2088568390 -0.0655044802 0.0069913878 0.4677112555 0.2856302491 [146] 0.3110060853 -0.1629066605 -0.4554351451 -0.4369095138 -0.4341433074 [151] 0.2764601114 0.0402943230 -0.5880834662 -0.0006461152 0.3623568554 [156] 0.0702867718 -0.5315795454 0.0844521226 -0.4203783194 0.1615716697 [161] 0.1672516155 0.7137220585 -0.2327850305 0.2992224321 -0.5008542476 [166] 0.2636416656 0.5209134937 -0.0872545477 0.1541587696 -0.3507168408 [171] -0.8989146743 -0.3478145573 -0.8802817571 0.0803243858 -0.0666129904 [176] 0.4400134186 -0.2707241716 0.0269141378 -0.1408227807 0.5416593184 [181] -0.4008709845 -0.3625658914 0.0041342955 -0.0633189117 -0.3418152803 [186] 0.1559613032 0.2711587770 0.0723696185 -0.3618857484 0.3062780185 [191] 0.2479777160 -0.1564276489 -0.3905866378 -0.0931138511 -0.0349746369 [196] -0.3928728303 0.4613827150 0.6552457840 0.2404386893 0.2254662973 [201] 0.5207159442 -0.1120102579 -0.0838643316 -0.3486447337 -0.0866701103 [206] -0.1371265646 0.1450998497 0.5150897360 0.0632635609 0.2070898727 [211] -0.1444583588 -0.0751238044 -0.0629277700 -0.3847062992 0.4392670343 [216] 0.1049450237 0.0290470736 0.0189840962 -0.1943242787 -0.4879376672 [221] -0.6032424133 0.3321400349 0.1815745885 -0.6770606786 0.0253992137 [226] -0.1965350941 0.3561869328 -0.4760914341 0.5565328049 -0.0558619333 > > proc.time() user system elapsed 3.50 18.78 104.12
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: 0x000001df9bcfe6b0> > .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: 0x000001df9bcfe6b0> > .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: 0x000001df9bcfe6b0> > .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: 0x000001df9bcfe6b0> > 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: 0x000001df9bcfe9b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe9b0> > .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: 0x000001df9bcfe9b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe9b0> > .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: 0x000001df9bcfe9b0> > 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: 0x000001df9bcfe110> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe110> > .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: 0x000001df9bcfe110> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001df9bcfe110> > .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: 0x000001df9bcfe110> > > .Call("R_bm_RowMode",P) <pointer: 0x000001df9bcfe110> > .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: 0x000001df9bcfe110> > > .Call("R_bm_ColMode",P) <pointer: 0x000001df9bcfe110> > .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: 0x000001df9bcfe110> > 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: 0x000001df9bcfe770> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001df9bcfe770> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe770> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe770> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9c1817885c1b" "BufferedMatrixFile9c181e8e6122" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9c1817885c1b" "BufferedMatrixFile9c181e8e6122" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe1d0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9bcfe1d0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001df9bcfe1d0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001df9bcfe1d0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001df9bcfe1d0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001df9bcfe1d0> > .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: 0x000001df9b07a410> > .Call("R_bm_AddColumn",P) <pointer: 0x000001df9b07a410> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001df9b07a410> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001df9b07a410> > 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: 0x000001df9bcfe4d0> > .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: 0x000001df9bcfe4d0> > rm(P) > > proc.time() user system elapsed 0.25 0.18 0.84
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.25 0.12 0.29