Back to Multiple platform build/check report for BioC 3.18: simplified long |
|
This page was generated on 2024-03-29 11:36:36 -0400 (Fri, 29 Mar 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4669 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" | 4404 |
merida1 | macOS 12.7.1 Monterey | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4427 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 246/2266 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.66.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.1 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.66.0 |
Command: F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.18-bioc\R\library --no-vignettes --timings BufferedMatrix_1.66.0.tar.gz |
StartedAt: 2024-03-27 22:59:33 -0400 (Wed, 27 Mar 2024) |
EndedAt: 2024-03-27 23:00:36 -0400 (Wed, 27 Mar 2024) |
EllapsedTime: 63.2 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.18-bioc\R\library --no-vignettes --timings BufferedMatrix_1.66.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.3.3 (2024-02-29 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.66.0' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'BufferedMatrix' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 12.3.0' * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files for x64 is not available File 'F:/biocbuild/bbs-3.18-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf. The detected symbols are linked into the code but might come from libraries and not actually be called. See 'Writing portable packages' in the 'Writing R Extensions' manual. * checking sizes of PDF files under 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'Rcodetesting.R' Running 'c_code_level_tests.R' Running 'objectTesting.R' Running 'rawCalltesting.R' OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See 'F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.18-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 12.3.0' gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"F:/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.18-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.18-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for 'rowMeans' in package 'BufferedMatrix' Creating a new generic function for 'rowSums' in package 'BufferedMatrix' Creating a new generic function for 'colMeans' in package 'BufferedMatrix' Creating a new generic function for 'colSums' in package 'BufferedMatrix' Creating a generic function for 'ncol' from package 'base' in package 'BufferedMatrix' Creating a generic function for 'nrow' from package 'base' in package 'BufferedMatrix' ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.32 0.15 0.64
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 454760 24.3 979027 52.3 640574 34.3 Vcells 825530 6.3 8388608 64.0 1998750 15.3 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Mar 27 22:59:58 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 Mar 27 22:59:58 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: 0x000001d6214757b0> > > > > 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 Mar 27 23:00:05 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 Mar 27 23:00:07 2024" > > ColMode(tmp2) <pointer: 0x000001d6214757b0> > > > > ### 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,] 97.303124 -1.386613362 -1.4084744 -0.06887572 [2,] -0.294815 0.009022925 -0.3454913 -0.90821935 [3,] -1.317284 -2.176121961 0.6860670 0.11382677 [4,] -2.268346 -3.531327696 0.2238439 0.29966289 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 97.303124 1.386613362 1.4084744 0.06887572 [2,] 0.294815 0.009022925 0.3454913 0.90821935 [3,] 1.317284 2.176121961 0.6860670 0.11382677 [4,] 2.268346 3.531327696 0.2238439 0.29966289 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.8642346 1.17754548 1.1867916 0.2624418 [2,] 0.5429687 0.09498908 0.5877851 0.9530054 [3,] 1.1477299 1.47516845 0.8282916 0.3373822 [4,] 1.5061029 1.87918272 0.4731214 0.5474147 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 220.94547 38.16207 38.27639 27.69329 [2,] 30.72450 25.95891 31.22334 35.43827 [3,] 37.79458 41.92781 33.96898 28.48765 [4,] 42.32937 47.32315 29.95506 30.77381 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001d621476380> > exp(tmp5) <pointer: 0x000001d621476380> > log(tmp5,2) <pointer: 0x000001d621476380> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 459.869 > Min(tmp5) [1] 53.99832 > mean(tmp5) [1] 72.29102 > Sum(tmp5) [1] 14458.2 > Var(tmp5) [1] 831.3472 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.09979 67.71443 74.73284 70.82837 70.87478 69.67038 69.40257 71.49402 [9] 67.91486 68.17813 > rowSums(tmp5) [1] 1841.996 1354.289 1494.657 1416.567 1417.496 1393.408 1388.051 1429.880 [9] 1358.297 1363.563 > rowVars(tmp5) [1] 7549.48043 62.69915 72.11239 121.27226 51.58912 69.51287 [7] 59.19620 72.58814 107.43244 41.01328 > rowSd(tmp5) [1] 86.887746 7.918279 8.491902 11.012369 7.182557 8.337438 7.693907 [8] 8.519867 10.364962 6.404161 > rowMax(tmp5) [1] 459.86905 82.32417 92.12111 98.49695 84.28558 86.24134 83.31486 [8] 87.93480 89.56007 80.00502 > rowMin(tmp5) [1] 57.63996 54.03008 59.29331 56.98420 57.06439 58.51665 56.56098 55.31821 [9] 53.99832 57.44991 > > colMeans(tmp5) [1] 111.05423 75.48356 71.32435 70.15159 68.39525 71.83450 73.41277 [8] 67.73578 70.91264 68.77776 70.83193 72.02178 68.57959 72.70549 [15] 70.59723 68.62102 67.61007 70.47923 65.96496 69.32663 > colSums(tmp5) [1] 1110.5423 754.8356 713.2435 701.5159 683.9525 718.3450 734.1277 [8] 677.3578 709.1264 687.7776 708.3193 720.2178 685.7959 727.0549 [15] 705.9723 686.2102 676.1007 704.7923 659.6496 693.2663 > colVars(tmp5) [1] 15074.37327 173.69682 57.44908 106.40698 60.67414 54.71748 [7] 43.37735 48.54722 57.37848 121.44808 50.25980 72.52524 [13] 48.08329 69.05033 67.81771 148.06226 55.68795 67.98971 [19] 66.09429 75.68855 > colSd(tmp5) [1] 122.777739 13.179409 7.579517 10.315376 7.789361 7.397127 [7] 6.586148 6.967583 7.574858 11.020348 7.089415 8.516175 [13] 6.934212 8.309653 8.235151 12.168084 7.462436 8.245587 [19] 8.129839 8.699917 > colMax(tmp5) [1] 459.86905 98.49695 79.95581 89.56007 86.24134 84.28558 80.34513 [8] 80.20744 80.89526 91.69445 85.13223 83.31486 79.41225 87.93480 [15] 84.24579 92.12111 82.44459 84.99403 85.93746 84.67815 > colMin(tmp5) [1] 63.86515 54.03008 57.83484 57.63996 60.69599 60.92361 63.67885 58.67129 [9] 53.99832 55.31821 60.88762 56.98420 58.57945 62.40630 56.39362 55.08138 [17] 58.09390 57.95329 57.06439 56.56098 > > > ### 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] 92.09979 67.71443 74.73284 70.82837 70.87478 69.67038 69.40257 NA [9] 67.91486 68.17813 > rowSums(tmp5) [1] 1841.996 1354.289 1494.657 1416.567 1417.496 1393.408 1388.051 NA [9] 1358.297 1363.563 > rowVars(tmp5) [1] 7549.48043 62.69915 72.11239 121.27226 51.58912 69.51287 [7] 59.19620 75.37955 107.43244 41.01328 > rowSd(tmp5) [1] 86.887746 7.918279 8.491902 11.012369 7.182557 8.337438 7.693907 [8] 8.682140 10.364962 6.404161 > rowMax(tmp5) [1] 459.86905 82.32417 92.12111 98.49695 84.28558 86.24134 83.31486 [8] NA 89.56007 80.00502 > rowMin(tmp5) [1] 57.63996 54.03008 59.29331 56.98420 57.06439 58.51665 56.56098 NA [9] 53.99832 57.44991 > > colMeans(tmp5) [1] 111.05423 75.48356 71.32435 70.15159 68.39525 71.83450 73.41277 [8] 67.73578 NA 68.77776 70.83193 72.02178 68.57959 72.70549 [15] 70.59723 68.62102 67.61007 70.47923 65.96496 69.32663 > colSums(tmp5) [1] 1110.5423 754.8356 713.2435 701.5159 683.9525 718.3450 734.1277 [8] 677.3578 NA 687.7776 708.3193 720.2178 685.7959 727.0549 [15] 705.9723 686.2102 676.1007 704.7923 659.6496 693.2663 > colVars(tmp5) [1] 15074.37327 173.69682 57.44908 106.40698 60.67414 54.71748 [7] 43.37735 48.54722 NA 121.44808 50.25980 72.52524 [13] 48.08329 69.05033 67.81771 148.06226 55.68795 67.98971 [19] 66.09429 75.68855 > colSd(tmp5) [1] 122.777739 13.179409 7.579517 10.315376 7.789361 7.397127 [7] 6.586148 6.967583 NA 11.020348 7.089415 8.516175 [13] 6.934212 8.309653 8.235151 12.168084 7.462436 8.245587 [19] 8.129839 8.699917 > colMax(tmp5) [1] 459.86905 98.49695 79.95581 89.56007 86.24134 84.28558 80.34513 [8] 80.20744 NA 91.69445 85.13223 83.31486 79.41225 87.93480 [15] 84.24579 92.12111 82.44459 84.99403 85.93746 84.67815 > colMin(tmp5) [1] 63.86515 54.03008 57.83484 57.63996 60.69599 60.92361 63.67885 58.67129 [9] NA 55.31821 60.88762 56.98420 58.57945 62.40630 56.39362 55.08138 [17] 58.09390 57.95329 57.06439 56.56098 > > Max(tmp5,na.rm=TRUE) [1] 459.869 > Min(tmp5,na.rm=TRUE) [1] 53.99832 > mean(tmp5,na.rm=TRUE) [1] 72.31817 > Sum(tmp5,na.rm=TRUE) [1] 14391.32 > Var(tmp5,na.rm=TRUE) [1] 835.3976 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.09979 67.71443 74.73284 70.82837 70.87478 69.67038 69.40257 71.73651 [9] 67.91486 68.17813 > rowSums(tmp5,na.rm=TRUE) [1] 1841.996 1354.289 1494.657 1416.567 1417.496 1393.408 1388.051 1362.994 [9] 1358.297 1363.563 > rowVars(tmp5,na.rm=TRUE) [1] 7549.48043 62.69915 72.11239 121.27226 51.58912 69.51287 [7] 59.19620 75.37955 107.43244 41.01328 > rowSd(tmp5,na.rm=TRUE) [1] 86.887746 7.918279 8.491902 11.012369 7.182557 8.337438 7.693907 [8] 8.682140 10.364962 6.404161 > rowMax(tmp5,na.rm=TRUE) [1] 459.86905 82.32417 92.12111 98.49695 84.28558 86.24134 83.31486 [8] 87.93480 89.56007 80.00502 > rowMin(tmp5,na.rm=TRUE) [1] 57.63996 54.03008 59.29331 56.98420 57.06439 58.51665 56.56098 55.31821 [9] 53.99832 57.44991 > > colMeans(tmp5,na.rm=TRUE) [1] 111.05423 75.48356 71.32435 70.15159 68.39525 71.83450 73.41277 [8] 67.73578 71.35994 68.77776 70.83193 72.02178 68.57959 72.70549 [15] 70.59723 68.62102 67.61007 70.47923 65.96496 69.32663 > colSums(tmp5,na.rm=TRUE) [1] 1110.5423 754.8356 713.2435 701.5159 683.9525 718.3450 734.1277 [8] 677.3578 642.2395 687.7776 708.3193 720.2178 685.7959 727.0549 [15] 705.9723 686.2102 676.1007 704.7923 659.6496 693.2663 > colVars(tmp5,na.rm=TRUE) [1] 15074.37327 173.69682 57.44908 106.40698 60.67414 54.71748 [7] 43.37735 48.54722 62.29988 121.44808 50.25980 72.52524 [13] 48.08329 69.05033 67.81771 148.06226 55.68795 67.98971 [19] 66.09429 75.68855 > colSd(tmp5,na.rm=TRUE) [1] 122.777739 13.179409 7.579517 10.315376 7.789361 7.397127 [7] 6.586148 6.967583 7.893027 11.020348 7.089415 8.516175 [13] 6.934212 8.309653 8.235151 12.168084 7.462436 8.245587 [19] 8.129839 8.699917 > colMax(tmp5,na.rm=TRUE) [1] 459.86905 98.49695 79.95581 89.56007 86.24134 84.28558 80.34513 [8] 80.20744 80.89526 91.69445 85.13223 83.31486 79.41225 87.93480 [15] 84.24579 92.12111 82.44459 84.99403 85.93746 84.67815 > colMin(tmp5,na.rm=TRUE) [1] 63.86515 54.03008 57.83484 57.63996 60.69599 60.92361 63.67885 58.67129 [9] 53.99832 55.31821 60.88762 56.98420 58.57945 62.40630 56.39362 55.08138 [17] 58.09390 57.95329 57.06439 56.56098 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.09979 67.71443 74.73284 70.82837 70.87478 69.67038 69.40257 NaN [9] 67.91486 68.17813 > rowSums(tmp5,na.rm=TRUE) [1] 1841.996 1354.289 1494.657 1416.567 1417.496 1393.408 1388.051 0.000 [9] 1358.297 1363.563 > rowVars(tmp5,na.rm=TRUE) [1] 7549.48043 62.69915 72.11239 121.27226 51.58912 69.51287 [7] 59.19620 NA 107.43244 41.01328 > rowSd(tmp5,na.rm=TRUE) [1] 86.887746 7.918279 8.491902 11.012369 7.182557 8.337438 7.693907 [8] NA 10.364962 6.404161 > rowMax(tmp5,na.rm=TRUE) [1] 459.86905 82.32417 92.12111 98.49695 84.28558 86.24134 83.31486 [8] NA 89.56007 80.00502 > rowMin(tmp5,na.rm=TRUE) [1] 57.63996 54.03008 59.29331 56.98420 57.06439 58.51665 56.56098 NA [9] 53.99832 57.44991 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.16567 75.20694 71.16292 68.54185 68.93715 71.90750 73.92883 [8] 67.29512 NaN 70.27327 69.24300 72.73682 68.11732 71.01334 [15] 71.03890 69.54383 67.50145 69.96743 66.37879 68.27136 > colSums(tmp5,na.rm=TRUE) [1] 1036.4910 676.8625 640.4663 616.8767 620.4343 647.1675 665.3595 [8] 605.6561 0.0000 632.4594 623.1870 654.6314 613.0559 639.1201 [15] 639.3501 625.8944 607.5130 629.7069 597.4091 614.4422 > colVars(tmp5,na.rm=TRUE) [1] 16768.50011 194.54806 64.33703 90.55620 64.95485 61.49721 [7] 45.80342 52.43114 NA 111.46803 28.13969 75.83902 [13] 51.68965 45.46884 74.10028 156.98990 62.51622 73.54166 [19] 72.42943 72.62169 > colSd(tmp5,na.rm=TRUE) [1] 129.493244 13.948048 8.021037 9.516102 8.059457 7.842016 [7] 6.767822 7.240935 NA 10.557842 5.304685 8.708560 [13] 7.189552 6.743059 8.608152 12.529561 7.906720 8.575644 [19] 8.510548 8.521836 > colMax(tmp5,na.rm=TRUE) [1] 459.86905 98.49695 79.95581 89.56007 86.24134 84.28558 80.34513 [8] 80.20744 -Inf 91.69445 76.44626 83.31486 79.41225 80.40392 [15] 84.24579 92.12111 82.44459 84.99403 85.93746 84.67815 > colMin(tmp5,na.rm=TRUE) [1] 63.86515 54.03008 57.83484 57.63996 60.69599 60.92361 63.67885 58.67129 [9] Inf 59.18926 60.88762 56.98420 58.57945 62.40630 56.39362 55.08138 [17] 58.09390 57.95329 57.06439 56.56098 > > > > > 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] 368.7895 299.8787 157.9171 284.0707 355.6078 200.4739 194.2444 156.7463 [9] 364.8765 176.6125 > apply(copymatrix,1,var,na.rm=TRUE) [1] 368.7895 299.8787 157.9171 284.0707 355.6078 200.4739 194.2444 156.7463 [9] 364.8765 176.6125 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -5.684342e-14 -1.705303e-13 -2.842171e-13 0.000000e+00 4.263256e-14 [6] 5.684342e-14 -1.847411e-13 -2.842171e-14 -2.842171e-14 1.705303e-13 [11] -4.263256e-14 2.273737e-13 2.842171e-14 -5.684342e-14 -2.842171e-14 [16] -5.684342e-14 8.526513e-14 0.000000e+00 5.684342e-14 -2.273737e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 7 5 7 8 16 2 11 7 19 4 7 8 4 9 9 4 1 7 5 5 8 9 10 8 16 7 15 2 15 8 14 5 4 7 16 1 15 2 18 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.668577 > Min(tmp) [1] -1.897696 > mean(tmp) [1] 0.04926574 > Sum(tmp) [1] 4.926574 > Var(tmp) [1] 0.9457886 > > rowMeans(tmp) [1] 0.04926574 > rowSums(tmp) [1] 4.926574 > rowVars(tmp) [1] 0.9457886 > rowSd(tmp) [1] 0.9725166 > rowMax(tmp) [1] 2.668577 > rowMin(tmp) [1] -1.897696 > > colMeans(tmp) [1] 1.738531091 -1.154208960 0.142332264 0.661422977 -0.009443692 [6] 0.533812074 0.348052764 1.666972935 -0.129555037 1.951239198 [11] -0.270275343 -1.162389755 -1.042780501 -0.178585321 1.624381800 [16] 1.323363739 -0.828929370 -0.297153096 0.487177053 -0.336430785 [21] -0.429368103 -1.261476764 -0.389713223 -0.159378032 -0.043561096 [26] -0.548455035 1.753484065 0.148533406 0.267849877 -1.297384295 [31] -0.232890673 -0.487702395 1.328160518 0.981328555 0.668267068 [36] 1.077561109 -1.183347320 0.779745510 -1.083582800 -0.386317411 [41] 1.491202039 -1.270723389 0.785449489 0.036841840 -0.307722107 [46] 0.324693005 0.001909491 1.728210875 1.126499278 -1.149489276 [51] -1.897695585 1.031075232 -0.623218290 -1.362626129 0.987160704 [56] 0.675091976 -0.691218126 1.043691307 -0.380391216 -0.281254267 [61] 0.039008507 -0.144988824 0.110551592 0.751075563 -0.694337269 [66] 0.407801532 -1.392562485 -0.738584444 -0.219660870 -0.807291304 [71] -0.820006297 2.668576555 0.618839138 0.501154791 1.176079314 [76] 0.777606035 -0.957630164 -0.772930859 0.594339507 -1.183982062 [81] 1.266397790 -0.058427003 1.381641576 -1.615623078 -1.493532267 [86] 0.397050572 1.729529998 -1.131847579 1.301827893 -0.304270468 [91] -0.877847203 -0.203871412 -0.229583245 -0.674625277 0.429932840 [96] -1.460343992 0.517334176 -1.011413260 0.285070728 0.929341729 > colSums(tmp) [1] 1.738531091 -1.154208960 0.142332264 0.661422977 -0.009443692 [6] 0.533812074 0.348052764 1.666972935 -0.129555037 1.951239198 [11] -0.270275343 -1.162389755 -1.042780501 -0.178585321 1.624381800 [16] 1.323363739 -0.828929370 -0.297153096 0.487177053 -0.336430785 [21] -0.429368103 -1.261476764 -0.389713223 -0.159378032 -0.043561096 [26] -0.548455035 1.753484065 0.148533406 0.267849877 -1.297384295 [31] -0.232890673 -0.487702395 1.328160518 0.981328555 0.668267068 [36] 1.077561109 -1.183347320 0.779745510 -1.083582800 -0.386317411 [41] 1.491202039 -1.270723389 0.785449489 0.036841840 -0.307722107 [46] 0.324693005 0.001909491 1.728210875 1.126499278 -1.149489276 [51] -1.897695585 1.031075232 -0.623218290 -1.362626129 0.987160704 [56] 0.675091976 -0.691218126 1.043691307 -0.380391216 -0.281254267 [61] 0.039008507 -0.144988824 0.110551592 0.751075563 -0.694337269 [66] 0.407801532 -1.392562485 -0.738584444 -0.219660870 -0.807291304 [71] -0.820006297 2.668576555 0.618839138 0.501154791 1.176079314 [76] 0.777606035 -0.957630164 -0.772930859 0.594339507 -1.183982062 [81] 1.266397790 -0.058427003 1.381641576 -1.615623078 -1.493532267 [86] 0.397050572 1.729529998 -1.131847579 1.301827893 -0.304270468 [91] -0.877847203 -0.203871412 -0.229583245 -0.674625277 0.429932840 [96] -1.460343992 0.517334176 -1.011413260 0.285070728 0.929341729 > 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] 1.738531091 -1.154208960 0.142332264 0.661422977 -0.009443692 [6] 0.533812074 0.348052764 1.666972935 -0.129555037 1.951239198 [11] -0.270275343 -1.162389755 -1.042780501 -0.178585321 1.624381800 [16] 1.323363739 -0.828929370 -0.297153096 0.487177053 -0.336430785 [21] -0.429368103 -1.261476764 -0.389713223 -0.159378032 -0.043561096 [26] -0.548455035 1.753484065 0.148533406 0.267849877 -1.297384295 [31] -0.232890673 -0.487702395 1.328160518 0.981328555 0.668267068 [36] 1.077561109 -1.183347320 0.779745510 -1.083582800 -0.386317411 [41] 1.491202039 -1.270723389 0.785449489 0.036841840 -0.307722107 [46] 0.324693005 0.001909491 1.728210875 1.126499278 -1.149489276 [51] -1.897695585 1.031075232 -0.623218290 -1.362626129 0.987160704 [56] 0.675091976 -0.691218126 1.043691307 -0.380391216 -0.281254267 [61] 0.039008507 -0.144988824 0.110551592 0.751075563 -0.694337269 [66] 0.407801532 -1.392562485 -0.738584444 -0.219660870 -0.807291304 [71] -0.820006297 2.668576555 0.618839138 0.501154791 1.176079314 [76] 0.777606035 -0.957630164 -0.772930859 0.594339507 -1.183982062 [81] 1.266397790 -0.058427003 1.381641576 -1.615623078 -1.493532267 [86] 0.397050572 1.729529998 -1.131847579 1.301827893 -0.304270468 [91] -0.877847203 -0.203871412 -0.229583245 -0.674625277 0.429932840 [96] -1.460343992 0.517334176 -1.011413260 0.285070728 0.929341729 > colMin(tmp) [1] 1.738531091 -1.154208960 0.142332264 0.661422977 -0.009443692 [6] 0.533812074 0.348052764 1.666972935 -0.129555037 1.951239198 [11] -0.270275343 -1.162389755 -1.042780501 -0.178585321 1.624381800 [16] 1.323363739 -0.828929370 -0.297153096 0.487177053 -0.336430785 [21] -0.429368103 -1.261476764 -0.389713223 -0.159378032 -0.043561096 [26] -0.548455035 1.753484065 0.148533406 0.267849877 -1.297384295 [31] -0.232890673 -0.487702395 1.328160518 0.981328555 0.668267068 [36] 1.077561109 -1.183347320 0.779745510 -1.083582800 -0.386317411 [41] 1.491202039 -1.270723389 0.785449489 0.036841840 -0.307722107 [46] 0.324693005 0.001909491 1.728210875 1.126499278 -1.149489276 [51] -1.897695585 1.031075232 -0.623218290 -1.362626129 0.987160704 [56] 0.675091976 -0.691218126 1.043691307 -0.380391216 -0.281254267 [61] 0.039008507 -0.144988824 0.110551592 0.751075563 -0.694337269 [66] 0.407801532 -1.392562485 -0.738584444 -0.219660870 -0.807291304 [71] -0.820006297 2.668576555 0.618839138 0.501154791 1.176079314 [76] 0.777606035 -0.957630164 -0.772930859 0.594339507 -1.183982062 [81] 1.266397790 -0.058427003 1.381641576 -1.615623078 -1.493532267 [86] 0.397050572 1.729529998 -1.131847579 1.301827893 -0.304270468 [91] -0.877847203 -0.203871412 -0.229583245 -0.674625277 0.429932840 [96] -1.460343992 0.517334176 -1.011413260 0.285070728 0.929341729 > colMedians(tmp) [1] 1.738531091 -1.154208960 0.142332264 0.661422977 -0.009443692 [6] 0.533812074 0.348052764 1.666972935 -0.129555037 1.951239198 [11] -0.270275343 -1.162389755 -1.042780501 -0.178585321 1.624381800 [16] 1.323363739 -0.828929370 -0.297153096 0.487177053 -0.336430785 [21] -0.429368103 -1.261476764 -0.389713223 -0.159378032 -0.043561096 [26] -0.548455035 1.753484065 0.148533406 0.267849877 -1.297384295 [31] -0.232890673 -0.487702395 1.328160518 0.981328555 0.668267068 [36] 1.077561109 -1.183347320 0.779745510 -1.083582800 -0.386317411 [41] 1.491202039 -1.270723389 0.785449489 0.036841840 -0.307722107 [46] 0.324693005 0.001909491 1.728210875 1.126499278 -1.149489276 [51] -1.897695585 1.031075232 -0.623218290 -1.362626129 0.987160704 [56] 0.675091976 -0.691218126 1.043691307 -0.380391216 -0.281254267 [61] 0.039008507 -0.144988824 0.110551592 0.751075563 -0.694337269 [66] 0.407801532 -1.392562485 -0.738584444 -0.219660870 -0.807291304 [71] -0.820006297 2.668576555 0.618839138 0.501154791 1.176079314 [76] 0.777606035 -0.957630164 -0.772930859 0.594339507 -1.183982062 [81] 1.266397790 -0.058427003 1.381641576 -1.615623078 -1.493532267 [86] 0.397050572 1.729529998 -1.131847579 1.301827893 -0.304270468 [91] -0.877847203 -0.203871412 -0.229583245 -0.674625277 0.429932840 [96] -1.460343992 0.517334176 -1.011413260 0.285070728 0.929341729 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.738531 -1.154209 0.1423323 0.661423 -0.009443692 0.5338121 0.3480528 [2,] 1.738531 -1.154209 0.1423323 0.661423 -0.009443692 0.5338121 0.3480528 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.666973 -0.129555 1.951239 -0.2702753 -1.16239 -1.042781 -0.1785853 [2,] 1.666973 -0.129555 1.951239 -0.2702753 -1.16239 -1.042781 -0.1785853 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.624382 1.323364 -0.8289294 -0.2971531 0.4871771 -0.3364308 -0.4293681 [2,] 1.624382 1.323364 -0.8289294 -0.2971531 0.4871771 -0.3364308 -0.4293681 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.261477 -0.3897132 -0.159378 -0.0435611 -0.548455 1.753484 0.1485334 [2,] -1.261477 -0.3897132 -0.159378 -0.0435611 -0.548455 1.753484 0.1485334 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.2678499 -1.297384 -0.2328907 -0.4877024 1.328161 0.9813286 0.6682671 [2,] 0.2678499 -1.297384 -0.2328907 -0.4877024 1.328161 0.9813286 0.6682671 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.077561 -1.183347 0.7797455 -1.083583 -0.3863174 1.491202 -1.270723 [2,] 1.077561 -1.183347 0.7797455 -1.083583 -0.3863174 1.491202 -1.270723 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.7854495 0.03684184 -0.3077221 0.324693 0.001909491 1.728211 1.126499 [2,] 0.7854495 0.03684184 -0.3077221 0.324693 0.001909491 1.728211 1.126499 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.149489 -1.897696 1.031075 -0.6232183 -1.362626 0.9871607 0.675092 [2,] -1.149489 -1.897696 1.031075 -0.6232183 -1.362626 0.9871607 0.675092 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.6912181 1.043691 -0.3803912 -0.2812543 0.03900851 -0.1449888 0.1105516 [2,] -0.6912181 1.043691 -0.3803912 -0.2812543 0.03900851 -0.1449888 0.1105516 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.7510756 -0.6943373 0.4078015 -1.392562 -0.7385844 -0.2196609 -0.8072913 [2,] 0.7510756 -0.6943373 0.4078015 -1.392562 -0.7385844 -0.2196609 -0.8072913 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.8200063 2.668577 0.6188391 0.5011548 1.176079 0.777606 -0.9576302 [2,] -0.8200063 2.668577 0.6188391 0.5011548 1.176079 0.777606 -0.9576302 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.7729309 0.5943395 -1.183982 1.266398 -0.058427 1.381642 -1.615623 [2,] -0.7729309 0.5943395 -1.183982 1.266398 -0.058427 1.381642 -1.615623 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.493532 0.3970506 1.72953 -1.131848 1.301828 -0.3042705 -0.8778472 [2,] -1.493532 0.3970506 1.72953 -1.131848 1.301828 -0.3042705 -0.8778472 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.2038714 -0.2295832 -0.6746253 0.4299328 -1.460344 0.5173342 -1.011413 [2,] -0.2038714 -0.2295832 -0.6746253 0.4299328 -1.460344 0.5173342 -1.011413 [,99] [,100] [1,] 0.2850707 0.9293417 [2,] 0.2850707 0.9293417 > > > Max(tmp2) [1] 3.016741 > Min(tmp2) [1] -2.503019 > mean(tmp2) [1] 0.079943 > Sum(tmp2) [1] 7.9943 > Var(tmp2) [1] 0.9395979 > > rowMeans(tmp2) [1] 0.874252303 -0.251095315 1.101532815 -1.079321250 0.189085253 [6] 1.084761454 -0.560173279 -0.059117779 -1.190159481 0.418348928 [11] 0.271608630 -0.305356074 1.393144349 1.791768072 -0.244853953 [16] 0.541562118 -0.207663813 1.654406638 0.332872475 -0.021407996 [21] 2.559575779 -0.463244545 -0.904050091 -0.972827464 0.095990137 [26] 0.100793663 0.222716993 0.214415590 0.622673210 -0.743612059 [31] 0.530460935 0.499299435 -1.096598686 0.760115348 -0.621736368 [36] 2.687391211 -0.543283824 -0.944756314 0.168310920 -0.634946219 [41] 0.023866388 -0.986734452 0.352479908 -0.452338595 0.168686311 [46] 0.631692039 -0.494798748 -0.053889192 0.258878645 -0.794627211 [51] 0.160301704 -0.922038597 -1.175077538 -0.535212263 0.338003402 [56] 1.430218971 0.958218132 0.394595993 0.089088152 1.009815390 [61] 0.442053409 -0.275150471 3.016741466 -1.847084589 -0.311107676 [66] 1.187047832 -1.575100383 0.005131386 1.405144650 -0.711067203 [71] 0.085123889 -0.833214809 -0.844522048 -0.643449262 1.047374871 [76] 0.975064064 -0.574469610 0.798015167 -1.138245214 0.188532686 [81] 0.372463761 -0.722241426 -1.453409449 0.193150719 0.233505258 [86] -0.435130229 0.663129992 -0.206213116 0.415883407 -2.503018630 [91] -1.839061251 0.253267345 1.048277494 1.897347158 1.073621236 [96] 1.073238921 -0.954883765 -0.212400776 1.158166432 -0.130221779 > rowSums(tmp2) [1] 0.874252303 -0.251095315 1.101532815 -1.079321250 0.189085253 [6] 1.084761454 -0.560173279 -0.059117779 -1.190159481 0.418348928 [11] 0.271608630 -0.305356074 1.393144349 1.791768072 -0.244853953 [16] 0.541562118 -0.207663813 1.654406638 0.332872475 -0.021407996 [21] 2.559575779 -0.463244545 -0.904050091 -0.972827464 0.095990137 [26] 0.100793663 0.222716993 0.214415590 0.622673210 -0.743612059 [31] 0.530460935 0.499299435 -1.096598686 0.760115348 -0.621736368 [36] 2.687391211 -0.543283824 -0.944756314 0.168310920 -0.634946219 [41] 0.023866388 -0.986734452 0.352479908 -0.452338595 0.168686311 [46] 0.631692039 -0.494798748 -0.053889192 0.258878645 -0.794627211 [51] 0.160301704 -0.922038597 -1.175077538 -0.535212263 0.338003402 [56] 1.430218971 0.958218132 0.394595993 0.089088152 1.009815390 [61] 0.442053409 -0.275150471 3.016741466 -1.847084589 -0.311107676 [66] 1.187047832 -1.575100383 0.005131386 1.405144650 -0.711067203 [71] 0.085123889 -0.833214809 -0.844522048 -0.643449262 1.047374871 [76] 0.975064064 -0.574469610 0.798015167 -1.138245214 0.188532686 [81] 0.372463761 -0.722241426 -1.453409449 0.193150719 0.233505258 [86] -0.435130229 0.663129992 -0.206213116 0.415883407 -2.503018630 [91] -1.839061251 0.253267345 1.048277494 1.897347158 1.073621236 [96] 1.073238921 -0.954883765 -0.212400776 1.158166432 -0.130221779 > 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.874252303 -0.251095315 1.101532815 -1.079321250 0.189085253 [6] 1.084761454 -0.560173279 -0.059117779 -1.190159481 0.418348928 [11] 0.271608630 -0.305356074 1.393144349 1.791768072 -0.244853953 [16] 0.541562118 -0.207663813 1.654406638 0.332872475 -0.021407996 [21] 2.559575779 -0.463244545 -0.904050091 -0.972827464 0.095990137 [26] 0.100793663 0.222716993 0.214415590 0.622673210 -0.743612059 [31] 0.530460935 0.499299435 -1.096598686 0.760115348 -0.621736368 [36] 2.687391211 -0.543283824 -0.944756314 0.168310920 -0.634946219 [41] 0.023866388 -0.986734452 0.352479908 -0.452338595 0.168686311 [46] 0.631692039 -0.494798748 -0.053889192 0.258878645 -0.794627211 [51] 0.160301704 -0.922038597 -1.175077538 -0.535212263 0.338003402 [56] 1.430218971 0.958218132 0.394595993 0.089088152 1.009815390 [61] 0.442053409 -0.275150471 3.016741466 -1.847084589 -0.311107676 [66] 1.187047832 -1.575100383 0.005131386 1.405144650 -0.711067203 [71] 0.085123889 -0.833214809 -0.844522048 -0.643449262 1.047374871 [76] 0.975064064 -0.574469610 0.798015167 -1.138245214 0.188532686 [81] 0.372463761 -0.722241426 -1.453409449 0.193150719 0.233505258 [86] -0.435130229 0.663129992 -0.206213116 0.415883407 -2.503018630 [91] -1.839061251 0.253267345 1.048277494 1.897347158 1.073621236 [96] 1.073238921 -0.954883765 -0.212400776 1.158166432 -0.130221779 > rowMin(tmp2) [1] 0.874252303 -0.251095315 1.101532815 -1.079321250 0.189085253 [6] 1.084761454 -0.560173279 -0.059117779 -1.190159481 0.418348928 [11] 0.271608630 -0.305356074 1.393144349 1.791768072 -0.244853953 [16] 0.541562118 -0.207663813 1.654406638 0.332872475 -0.021407996 [21] 2.559575779 -0.463244545 -0.904050091 -0.972827464 0.095990137 [26] 0.100793663 0.222716993 0.214415590 0.622673210 -0.743612059 [31] 0.530460935 0.499299435 -1.096598686 0.760115348 -0.621736368 [36] 2.687391211 -0.543283824 -0.944756314 0.168310920 -0.634946219 [41] 0.023866388 -0.986734452 0.352479908 -0.452338595 0.168686311 [46] 0.631692039 -0.494798748 -0.053889192 0.258878645 -0.794627211 [51] 0.160301704 -0.922038597 -1.175077538 -0.535212263 0.338003402 [56] 1.430218971 0.958218132 0.394595993 0.089088152 1.009815390 [61] 0.442053409 -0.275150471 3.016741466 -1.847084589 -0.311107676 [66] 1.187047832 -1.575100383 0.005131386 1.405144650 -0.711067203 [71] 0.085123889 -0.833214809 -0.844522048 -0.643449262 1.047374871 [76] 0.975064064 -0.574469610 0.798015167 -1.138245214 0.188532686 [81] 0.372463761 -0.722241426 -1.453409449 0.193150719 0.233505258 [86] -0.435130229 0.663129992 -0.206213116 0.415883407 -2.503018630 [91] -1.839061251 0.253267345 1.048277494 1.897347158 1.073621236 [96] 1.073238921 -0.954883765 -0.212400776 1.158166432 -0.130221779 > > colMeans(tmp2) [1] 0.079943 > colSums(tmp2) [1] 7.9943 > colVars(tmp2) [1] 0.9395979 > colSd(tmp2) [1] 0.9693286 > colMax(tmp2) [1] 3.016741 > colMin(tmp2) [1] -2.503019 > colMedians(tmp2) [1] 0.0983919 > colRanges(tmp2) [,1] [1,] -2.503019 [2,] 3.016741 > > 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] -3.7415840 -4.5386905 -2.0066125 -5.4580148 3.2626214 0.6813137 [7] 4.4780868 3.3728886 0.5705875 -2.4947994 > colApply(tmp,quantile)[,1] [,1] [1,] -2.20290681 [2,] -1.22407787 [3,] -0.06953947 [4,] 0.04293347 [5,] 1.81052677 > > rowApply(tmp,sum) [1] 1.8155740 -0.2667449 -6.3425911 3.5459962 0.2037758 -1.3169099 [7] -0.4328092 -0.4236126 -0.3929977 -2.2638839 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 4 3 3 1 3 6 10 8 5 [2,] 3 10 4 2 10 4 3 3 2 7 [3,] 5 3 8 9 4 2 7 4 1 4 [4,] 9 8 1 1 2 7 9 5 4 1 [5,] 7 6 9 8 3 1 1 9 10 6 [6,] 10 1 5 6 8 8 2 8 7 8 [7,] 8 7 2 7 5 10 4 7 9 9 [8,] 4 9 6 10 9 5 8 6 6 3 [9,] 6 2 10 5 7 9 10 1 5 2 [10,] 2 5 7 4 6 6 5 2 3 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.11054586 0.66356216 2.51148531 -2.99016325 0.07540349 0.52632874 [7] 3.40290577 1.33160928 -0.45878444 2.26931188 3.78659567 2.53741661 [13] 1.45375008 0.62228656 2.12343297 -0.57274621 -1.32331768 1.43856203 [19] 2.01555233 -2.83018287 > colApply(tmp,quantile)[,1] [,1] [1,] -0.38105403 [2,] -0.08120728 [3,] 0.10904247 [4,] 0.19380987 [5,] 1.26995482 > > rowApply(tmp,sum) [1] 7.0972498 6.7823697 -3.4821815 6.6970931 0.5990233 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 17 5 13 8 10 [2,] 6 9 10 14 13 [3,] 19 20 12 6 4 [4,] 5 18 1 2 3 [5,] 2 7 16 9 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.26995482 -0.3728624 1.29749162 -0.4620286 -0.89901702 0.5378237 [2,] -0.38105403 0.2077833 1.84764443 1.5261940 -0.16049354 0.7300897 [3,] -0.08120728 -0.1916875 -0.08849822 -1.7081432 0.08008099 -1.1709734 [4,] 0.19380987 0.5861057 0.04578550 -1.2825260 0.20258885 0.2206986 [5,] 0.10904247 0.4342231 -0.59093801 -1.0636594 0.85224421 0.2086902 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.2147291 -0.50427179 0.54581367 0.94803194 1.3350277 0.7972578 [2,] 1.6645041 0.33879791 -0.74228896 0.03822517 1.0447187 -0.9158575 [3,] -0.2786962 -0.04805435 -0.15281066 1.76705902 1.0360129 1.6936633 [4,] -0.3259931 0.80279120 0.04735828 -0.47268004 0.2222766 1.3137394 [5,] 1.1283619 0.74234631 -0.15685676 -0.01132420 0.1485598 -0.3513864 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.93831751 -0.1761419 0.9212911 -0.8538989 0.1832661 0.6627471 [2,] 0.71643852 -0.6118864 0.3920417 -1.1513450 1.1386153 0.3079768 [3,] -0.02616301 -0.9040590 -0.3086078 -0.3728244 -1.3848484 -1.0251038 [4,] -0.02493070 1.4568478 0.4511783 0.5202176 1.2606605 0.8012214 [5,] -0.14991223 0.8575260 0.6675296 1.2851045 -2.5210111 0.6917206 [,19] [,20] [1,] 1.2817488 -1.5680306 [2,] 1.0000576 -0.2077921 [3,] -0.8252799 0.5079595 [4,] 2.1367336 -1.4587902 [5,] -1.5777077 -0.1035295 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 618 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 538 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.687415 -1.481581 0.04270547 -0.7856074 0.7687292 -0.09507838 -1.251379 col8 col9 col10 col11 col12 col13 col14 row1 1.515768 0.08200851 0.6826468 -0.1101727 1.037521 -1.555634 -0.5127916 col15 col16 col17 col18 col19 col20 row1 -0.2964094 0.8864085 -0.2170261 -0.2419833 0.0798957 0.9199456 > tmp[,"col10"] col10 row1 0.6826468 row2 1.5484179 row3 1.6164028 row4 0.6564846 row5 2.3470374 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -1.687415 -1.481581 0.04270547 -0.7856074 0.7687292 -0.09507838 row5 1.595136 2.107671 -0.36537153 -2.2825466 -0.2329525 -0.34132639 col7 col8 col9 col10 col11 col12 row1 -1.2513791 1.51576820 0.08200851 0.6826468 -0.1101727 1.0375212 row5 -0.6428033 -0.09164217 1.81014716 2.3470374 -3.0838605 -0.4309239 col13 col14 col15 col16 col17 col18 row1 -1.5556344 -0.5127916 -0.2964094 0.8864085 -0.2170261 -0.2419833 row5 0.9650025 -1.6061156 0.5208370 -1.0894180 0.5035880 0.6522711 col19 col20 row1 0.0798957 0.9199456 row5 -1.6750284 -0.1496979 > tmp[,c("col6","col20")] col6 col20 row1 -0.09507838 0.9199456 row2 0.23752188 1.3193487 row3 0.13958550 0.8509274 row4 0.20494357 -1.2534551 row5 -0.34132639 -0.1496979 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.09507838 0.9199456 row5 -0.34132639 -0.1496979 > > > > > 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.81834 51.05108 50.05376 51.90238 49.68498 106.663 50.08398 49.12603 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.16363 49.73574 50.346 50.04109 50.76198 50.14748 50.6555 48.75915 col17 col18 col19 col20 row1 49.86592 50.1194 49.31596 104.9406 > tmp[,"col10"] col10 row1 49.73574 row2 28.55001 row3 29.86009 row4 28.88679 row5 49.36630 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.81834 51.05108 50.05376 51.90238 49.68498 106.6630 50.08398 49.12603 row5 51.58024 52.14911 47.54238 50.17921 50.21837 105.3021 49.07061 50.82996 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.16363 49.73574 50.3460 50.04109 50.76198 50.14748 50.65550 48.75915 row5 49.51538 49.36630 48.6648 49.11295 50.29026 50.87218 48.84189 50.99469 col17 col18 col19 col20 row1 49.86592 50.11940 49.31596 104.9406 row5 50.45425 51.26972 49.11512 106.6971 > tmp[,c("col6","col20")] col6 col20 row1 106.66304 104.94063 row2 74.26991 76.19147 row3 74.48219 74.24600 row4 74.79923 75.94163 row5 105.30209 106.69710 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.6630 104.9406 row5 105.3021 106.6971 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.6630 104.9406 row5 105.3021 106.6971 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.1885420 [2,] -0.6466246 [3,] -0.4866528 [4,] 0.4489236 [5,] -0.1373737 > tmp[,c("col17","col7")] col17 col7 [1,] 1.1732341 0.0462206 [2,] 0.4658784 0.2271795 [3,] 1.4646893 -1.0985027 [4,] -0.5457632 -0.5725226 [5,] -0.2710241 0.1734193 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.2758666 0.1569720 [2,] -1.2578646 -0.1993026 [3,] -1.5506288 0.4718136 [4,] -0.5835024 0.8455214 [5,] -0.2787624 1.3071064 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.275867 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.275867 [2,] -1.257865 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -1.3158061 -0.788523 -0.2921903 0.5999378 0.2129093 -0.5286251 -0.5185783 row1 0.6486103 -1.165448 0.5581260 0.4830693 -0.3975893 -0.1799961 0.8118978 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.083396 1.6790163 0.2194372 -0.7421439 -0.1533648 0.3800084 row1 2.051019 -0.7363768 -0.7307313 0.6911249 -1.0849813 -0.1804583 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.08393346 -0.3999591 -0.07973744 -0.3658993 0.18094485 -0.2790498 row1 2.46647747 0.6890233 0.06717872 0.9639360 -0.03371542 -1.2199881 [,20] row3 0.2421806 row1 0.1359369 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.2121535 -0.193988 0.07788779 -0.4951726 0.4034369 0.006093882 -0.6972124 [,8] [,9] [,10] row2 0.139741 1.6104 -1.395784 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.3325198 1.656636 -0.4385694 -1.033831 0.7662219 -0.3818264 0.4941645 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.03035813 -0.6218302 -0.5902527 1.05608 -0.9775555 -0.2281994 1.289371 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.1806437 -0.525857 1.276375 -0.4827422 2.650937 -1.898268 > > > 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: 0x000001d621476310> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5828032529" [2] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc581fa365e0" [3] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc58fd72dd" [4] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc58623e392c" [5] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5839df3941" [6] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5840d63a5a" [7] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5878b469e3" [8] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc584ad11f08" [9] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5840113bde" [10] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5843ee30c7" [11] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5834cc7bfe" [12] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5853d9e67" [13] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc58790b824" [14] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc5853fd1276" [15] "F:/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests\\BMc588b49ec" > > > ### 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: 0x000001d62256e2c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001d62256e2c0> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.18-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001d62256e2c0> > rowMedians(tmp) [1] 0.1242688589 -0.2755935535 -0.0319637250 -0.6361247396 -0.2223430935 [6] -0.0949678225 0.0001637236 0.0423537582 -0.0179102846 0.5178039371 [11] -0.0216539408 -0.2207247409 0.4860255061 0.0931967135 -0.2947763637 [16] -0.4268126742 0.5849897731 0.0970132564 -0.0763287118 -0.0030448071 [21] 0.0052711857 0.0890910152 -0.0012593758 0.3739200612 -0.4483123433 [26] 0.3517848128 -0.3578267786 0.1545004953 0.4996710275 0.0883244420 [31] 0.2863005690 0.4346237624 -0.2246923586 -0.4989168682 0.0860310342 [36] 0.3829160529 0.1022500480 -0.1821361001 0.1490870837 0.2470551548 [41] -0.0635826720 0.2801257482 0.0950463039 0.1718603819 0.2449338885 [46] 0.1429484877 0.4411891837 -0.2074624781 0.3505920929 -0.0875526339 [51] 0.0851225769 0.0486025556 0.3622137953 0.1982286936 -0.1708571423 [56] 0.1315498955 0.0289527012 0.1571665519 0.4290939395 -0.2449178839 [61] -0.4347327097 0.0695577629 0.5929624709 -0.5638516492 -0.2983654969 [66] -0.7190505905 -0.6127615552 0.1006308357 -0.0466004060 0.0477642114 [71] 0.1012798246 0.1175073517 0.1030637457 0.3369717175 0.0262692963 [76] -0.3777320574 0.3059581835 0.0321181792 -0.2981692889 0.4501297389 [81] -0.2147220791 0.2918884017 0.2840940645 -0.0947826899 0.3655600252 [86] 0.3508938787 0.2383057300 -0.1161611289 0.1609011132 -0.0352747184 [91] 0.1653800923 -0.4391764501 -0.0400961980 0.4079352816 -0.0847322427 [96] 0.3862633912 -0.4024423683 0.0900809417 0.0660957729 0.4282816675 [101] 0.0121869270 0.1779195864 -0.1818764659 -0.0413348220 -0.4267041693 [106] -0.0455705267 0.4606021102 -0.3110784183 0.4131916048 0.1166528373 [111] -0.2332497442 0.0917863300 0.4611056790 -0.4813679068 -0.1682820901 [116] -0.4208644959 0.6380878735 -0.2658119391 0.4070120972 0.0114666317 [121] 0.1086897760 0.1535238625 -0.2242095756 0.1470301340 -0.1166932653 [126] 0.4229875927 -0.0071225098 -0.1644598006 0.5980727569 -0.2318614028 [131] -0.3542423941 -0.3261510723 0.0288411517 0.2719790602 -0.5427544950 [136] 0.2621440862 -0.7661750910 -0.3005823592 -0.2834381966 0.0855130145 [141] -0.0703856236 -0.2229559525 -0.3832463050 0.0148704784 -0.2551517149 [146] 0.2400412195 -0.4612457410 0.3572413501 0.7310191902 0.5085329177 [151] -0.0455530516 -0.5053009465 -0.3020410726 -0.1666013550 0.4682547340 [156] 0.3767627884 0.1249738193 0.1646760924 0.3082102879 0.2715824857 [161] 0.1822353052 -0.5220156738 0.3559056121 0.1500532296 -0.2086923860 [166] 0.3772286810 -0.5469746307 -0.1489546611 -0.0166665085 0.1217155031 [171] 1.0270183126 -0.2495158297 0.5181028774 0.5739061329 0.4291429348 [176] -0.0567444102 0.2378017915 0.3291914982 0.5119416610 0.4348717196 [181] -0.0687252901 0.5785514591 -0.0747047970 -0.2472728122 -0.3571961179 [186] -0.2131833486 0.2507624506 0.1984294918 0.0537744673 0.2277161988 [191] 0.0810783924 0.1956100012 0.1734590719 -0.0349975078 -0.2873603134 [196] -0.1133836677 -0.2516499503 0.0160274161 0.0108414259 1.1957705498 [201] 0.2622974032 0.3055071905 0.0036607498 0.0602924911 -0.8345737475 [206] 0.0105643568 0.6073766856 -0.9184842778 0.3063747765 0.1477937938 [211] 0.2532994617 0.2960433192 -0.0393643881 0.3147950114 -0.0440814682 [216] 0.4106169965 0.2293118860 0.0079991781 -0.5422182334 -0.0896385896 [221] -0.7762903050 0.0089196759 0.4634612844 0.3433532026 -0.7694567194 [226] 0.0731958556 -0.0925750676 -0.0959953836 -0.0484110687 0.1795859012 > > proc.time() user system elapsed 3.54 17.43 32.18
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x000001c07a206cf0> > .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: 0x000001c07a206cf0> > .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: 0x000001c07a206cf0> > .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: 0x000001c07a206cf0> > 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: 0x000001c07a206f90> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a206f90> > .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: 0x000001c07a206f90> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a206f90> > .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: 0x000001c07a206f90> > 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: 0x000001c07a2067b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a2067b0> > .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: 0x000001c07a2067b0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001c07a2067b0> > .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: 0x000001c07a2067b0> > > .Call("R_bm_RowMode",P) <pointer: 0x000001c07a2067b0> > .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: 0x000001c07a2067b0> > > .Call("R_bm_ColMode",P) <pointer: 0x000001c07a2067b0> > .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: 0x000001c07a2067b0> > 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: 0x000001c07a206510> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001c07a206510> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a206510> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a206510> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile10f053db2b33" "BufferedMatrixFile10f063023502" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile10f053db2b33" "BufferedMatrixFile10f063023502" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a207150> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a207150> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001c07a207150> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001c07a207150> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001c07a207150> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001c07a207150> > .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: 0x000001c07a2071c0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001c07a2071c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001c07a2071c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001c07a2071c0> > 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: 0x000001c07a206740> > .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: 0x000001c07a206740> > rm(P) > > proc.time() user system elapsed 0.35 0.14 0.59
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.31 0.14 0.40