Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-05-31 19:29:44 -0400 (Fri, 31 May 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 RC (2024-04-16 r86468) -- "Puppy Cup" | 4669 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" | 4404 |
merida1 | macOS 12.7.4 Monterey | x86_64 | 4.4.0 Patched (2024-04-24 r86482) -- "Puppy Cup" | 4431 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.0 Patched (2024-04-24 r86482) -- "Puppy Cup" | 4384 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 244/2233 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.69.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.4 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | 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.69.0 |
Command: F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz |
StartedAt: 2024-05-31 04:40:34 -0400 (Fri, 31 May 2024) |
EndedAt: 2024-05-31 04:41:42 -0400 (Fri, 31 May 2024) |
EllapsedTime: 68.4 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.69.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.4.0 RC (2024-04-16 r86468 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.69.0' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'BufferedMatrix' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 13.2.0' * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files for x64 is not available File 'F:/biocbuild/bbs-3.20-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found '_exit', possibly from '_exit' (C) Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf. The detected symbols are linked into the code but might come from libraries and not actually be called. See 'Writing portable packages' in the 'Writing R Extensions' manual. * checking sizes of PDF files under 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'Rcodetesting.R' Running 'c_code_level_tests.R' Running 'objectTesting.R' Running 'rawCalltesting.R' OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See 'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.20-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 13.2.0' gcc -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.20-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.20-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for 'rowMeans' in package 'BufferedMatrix' Creating a new generic function for 'rowSums' in package 'BufferedMatrix' Creating a new generic function for 'colMeans' in package 'BufferedMatrix' Creating a new generic function for 'colSums' in package 'BufferedMatrix' Creating a generic function for 'ncol' from package 'base' in package 'BufferedMatrix' Creating a generic function for 'nrow' from package 'base' in package 'BufferedMatrix' ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.26 0.10 0.57
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 468464 25.1 1021761 54.6 633414 33.9 Vcells 853870 6.6 8388608 64.0 2003120 15.3 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri May 31 04:40:59 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] "Fri May 31 04:41:00 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: 0x000001977b4fd530> > > > > 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] "Fri May 31 04:41:06 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] "Fri May 31 04:41:09 2024" > > ColMode(tmp2) <pointer: 0x000001977b4fd530> > > > > ### 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,] 98.9195107 -0.3246289 -0.2202334 0.7340649 [2,] -0.5655266 -0.7894966 0.3468488 0.6644099 [3,] -0.1914722 1.4466565 0.2728346 2.6490460 [4,] 0.6582485 -0.7233208 -0.8488432 0.1687495 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.9195107 0.3246289 0.2202334 0.7340649 [2,] 0.5655266 0.7894966 0.3468488 0.6644099 [3,] 0.1914722 1.4466565 0.2728346 2.6490460 [4,] 0.6582485 0.7233208 0.8488432 0.1687495 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9458288 0.5697621 0.4692904 0.8567759 [2,] 0.7520150 0.8885362 0.5889387 0.8151135 [3,] 0.4375753 1.2027704 0.5223357 1.6275890 [4,] 0.8113252 0.8504827 0.9213269 0.4107913 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.37780 31.02225 29.91314 34.30182 [2,] 33.08568 34.67486 31.23624 33.81554 [3,] 29.56723 38.47436 30.49619 43.92494 [4,] 33.77150 34.22815 35.06211 29.27666 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001977b4fd7d0> > exp(tmp5) <pointer: 0x000001977b4fd7d0> > log(tmp5,2) <pointer: 0x000001977b4fd7d0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.9316 > Min(tmp5) [1] 52.88555 > mean(tmp5) [1] 71.96371 > Sum(tmp5) [1] 14392.74 > Var(tmp5) [1] 841.31 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.20762 69.08974 71.77468 71.90752 70.39010 67.71167 69.42393 67.46791 [9] 71.68785 70.97602 > rowSums(tmp5) [1] 1784.152 1381.795 1435.494 1438.150 1407.802 1354.233 1388.479 1349.358 [9] 1433.757 1419.520 > rowVars(tmp5) [1] 7860.25916 39.17037 73.80485 53.45428 49.37713 65.66077 [7] 50.57003 66.06771 99.40474 81.29777 > rowSd(tmp5) [1] 88.658103 6.258624 8.590975 7.311243 7.026886 8.103133 7.111261 [8] 8.128204 9.970192 9.016528 > rowMax(tmp5) [1] 464.93162 78.65260 91.42400 84.83150 82.74482 84.24205 79.64756 [8] 85.52375 95.05307 86.72882 > rowMin(tmp5) [1] 58.60576 58.15999 58.02872 55.61252 59.73422 52.88555 54.67982 54.53919 [9] 54.65467 54.30586 > > colMeans(tmp5) [1] 109.01302 73.21228 65.98404 69.33618 68.34552 71.08795 69.91921 [8] 71.97392 70.92434 68.32510 71.17547 69.72548 67.40490 69.78843 [15] 68.49254 72.29545 68.39134 74.15501 68.62930 71.09462 > colSums(tmp5) [1] 1090.1302 732.1228 659.8404 693.3618 683.4552 710.8795 699.1921 [8] 719.7392 709.2434 683.2510 711.7547 697.2548 674.0490 697.8843 [15] 684.9254 722.9545 683.9134 741.5501 686.2930 710.9462 > colVars(tmp5) [1] 15676.00922 29.96881 97.59988 132.91857 63.39933 56.33816 [7] 34.24729 68.85788 31.15726 57.36343 79.84131 24.23472 [13] 75.42619 45.16426 47.36201 95.65999 123.41187 91.99970 [19] 39.17940 41.08199 > colSd(tmp5) [1] 125.203871 5.474378 9.879265 11.529032 7.962370 7.505875 [7] 5.852119 8.298065 5.581868 7.573865 8.935397 4.922877 [13] 8.684825 6.720436 6.882006 9.780593 11.109089 9.591648 [19] 6.259345 6.409524 > colMax(tmp5) [1] 464.93162 82.08589 85.52375 91.42400 81.91843 84.83150 77.93796 [8] 84.76177 82.22026 77.10862 84.24205 76.21909 82.92047 79.94866 [15] 75.88172 86.72882 90.10848 95.05307 81.53951 78.65260 > colMin(tmp5) [1] 61.54031 64.56875 54.67982 54.30586 56.64905 59.73422 62.72305 58.15999 [9] 63.73761 54.73633 54.65467 59.37807 54.53919 59.64374 55.61252 58.56905 [17] 52.88555 60.65983 62.54602 58.02872 > > > ### 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] 89.20762 69.08974 71.77468 71.90752 NA 67.71167 69.42393 67.46791 [9] 71.68785 70.97602 > rowSums(tmp5) [1] 1784.152 1381.795 1435.494 1438.150 NA 1354.233 1388.479 1349.358 [9] 1433.757 1419.520 > rowVars(tmp5) [1] 7860.25916 39.17037 73.80485 53.45428 46.77726 65.66077 [7] 50.57003 66.06771 99.40474 81.29777 > rowSd(tmp5) [1] 88.658103 6.258624 8.590975 7.311243 6.839390 8.103133 7.111261 [8] 8.128204 9.970192 9.016528 > rowMax(tmp5) [1] 464.93162 78.65260 91.42400 84.83150 NA 84.24205 79.64756 [8] 85.52375 95.05307 86.72882 > rowMin(tmp5) [1] 58.60576 58.15999 58.02872 55.61252 NA 52.88555 54.67982 54.53919 [9] 54.65467 54.30586 > > colMeans(tmp5) [1] 109.01302 73.21228 65.98404 69.33618 68.34552 71.08795 69.91921 [8] 71.97392 70.92434 68.32510 71.17547 69.72548 67.40490 NA [15] 68.49254 72.29545 68.39134 74.15501 68.62930 71.09462 > colSums(tmp5) [1] 1090.1302 732.1228 659.8404 693.3618 683.4552 710.8795 699.1921 [8] 719.7392 709.2434 683.2510 711.7547 697.2548 674.0490 NA [15] 684.9254 722.9545 683.9134 741.5501 686.2930 710.9462 > colVars(tmp5) [1] 15676.00922 29.96881 97.59988 132.91857 63.39933 56.33816 [7] 34.24729 68.85788 31.15726 57.36343 79.84131 24.23472 [13] 75.42619 NA 47.36201 95.65999 123.41187 91.99970 [19] 39.17940 41.08199 > colSd(tmp5) [1] 125.203871 5.474378 9.879265 11.529032 7.962370 7.505875 [7] 5.852119 8.298065 5.581868 7.573865 8.935397 4.922877 [13] 8.684825 NA 6.882006 9.780593 11.109089 9.591648 [19] 6.259345 6.409524 > colMax(tmp5) [1] 464.93162 82.08589 85.52375 91.42400 81.91843 84.83150 77.93796 [8] 84.76177 82.22026 77.10862 84.24205 76.21909 82.92047 NA [15] 75.88172 86.72882 90.10848 95.05307 81.53951 78.65260 > colMin(tmp5) [1] 61.54031 64.56875 54.67982 54.30586 56.64905 59.73422 62.72305 58.15999 [9] 63.73761 54.73633 54.65467 59.37807 54.53919 NA 55.61252 58.56905 [17] 52.88555 60.65983 62.54602 58.02872 > > Max(tmp5,na.rm=TRUE) [1] 464.9316 > Min(tmp5,na.rm=TRUE) [1] 52.88555 > mean(tmp5,na.rm=TRUE) [1] 71.92358 > Sum(tmp5,na.rm=TRUE) [1] 14312.79 > Var(tmp5,na.rm=TRUE) [1] 845.2354 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.20762 69.08974 71.77468 71.90752 69.88702 67.71167 69.42393 67.46791 [9] 71.68785 70.97602 > rowSums(tmp5,na.rm=TRUE) [1] 1784.152 1381.795 1435.494 1438.150 1327.853 1354.233 1388.479 1349.358 [9] 1433.757 1419.520 > rowVars(tmp5,na.rm=TRUE) [1] 7860.25916 39.17037 73.80485 53.45428 46.77726 65.66077 [7] 50.57003 66.06771 99.40474 81.29777 > rowSd(tmp5,na.rm=TRUE) [1] 88.658103 6.258624 8.590975 7.311243 6.839390 8.103133 7.111261 [8] 8.128204 9.970192 9.016528 > rowMax(tmp5,na.rm=TRUE) [1] 464.93162 78.65260 91.42400 84.83150 82.74482 84.24205 79.64756 [8] 85.52375 95.05307 86.72882 > rowMin(tmp5,na.rm=TRUE) [1] 58.60576 58.15999 58.02872 55.61252 59.73422 52.88555 54.67982 54.53919 [9] 54.65467 54.30586 > > colMeans(tmp5,na.rm=TRUE) [1] 109.01302 73.21228 65.98404 69.33618 68.34552 71.08795 69.91921 [8] 71.97392 70.92434 68.32510 71.17547 69.72548 67.40490 68.65951 [15] 68.49254 72.29545 68.39134 74.15501 68.62930 71.09462 > colSums(tmp5,na.rm=TRUE) [1] 1090.1302 732.1228 659.8404 693.3618 683.4552 710.8795 699.1921 [8] 719.7392 709.2434 683.2510 711.7547 697.2548 674.0490 617.9356 [15] 684.9254 722.9545 683.9134 741.5501 686.2930 710.9462 > colVars(tmp5,na.rm=TRUE) [1] 15676.00922 29.96881 97.59988 132.91857 63.39933 56.33816 [7] 34.24729 68.85788 31.15726 57.36343 79.84131 24.23472 [13] 75.42619 36.47224 47.36201 95.65999 123.41187 91.99970 [19] 39.17940 41.08199 > colSd(tmp5,na.rm=TRUE) [1] 125.203871 5.474378 9.879265 11.529032 7.962370 7.505875 [7] 5.852119 8.298065 5.581868 7.573865 8.935397 4.922877 [13] 8.684825 6.039225 6.882006 9.780593 11.109089 9.591648 [19] 6.259345 6.409524 > colMax(tmp5,na.rm=TRUE) [1] 464.93162 82.08589 85.52375 91.42400 81.91843 84.83150 77.93796 [8] 84.76177 82.22026 77.10862 84.24205 76.21909 82.92047 79.57895 [15] 75.88172 86.72882 90.10848 95.05307 81.53951 78.65260 > colMin(tmp5,na.rm=TRUE) [1] 61.54031 64.56875 54.67982 54.30586 56.64905 59.73422 62.72305 58.15999 [9] 63.73761 54.73633 54.65467 59.37807 54.53919 59.64374 55.61252 58.56905 [17] 52.88555 60.65983 62.54602 58.02872 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.20762 69.08974 71.77468 71.90752 NaN 67.71167 69.42393 67.46791 [9] 71.68785 70.97602 > rowSums(tmp5,na.rm=TRUE) [1] 1784.152 1381.795 1435.494 1438.150 0.000 1354.233 1388.479 1349.358 [9] 1433.757 1419.520 > rowVars(tmp5,na.rm=TRUE) [1] 7860.25916 39.17037 73.80485 53.45428 NA 65.66077 [7] 50.57003 66.06771 99.40474 81.29777 > rowSd(tmp5,na.rm=TRUE) [1] 88.658103 6.258624 8.590975 7.311243 NA 8.103133 7.111261 [8] 8.128204 9.970192 9.016528 > rowMax(tmp5,na.rm=TRUE) [1] 464.93162 78.65260 91.42400 84.83150 NA 84.24205 79.64756 [8] 85.52375 95.05307 86.72882 > rowMin(tmp5,na.rm=TRUE) [1] 58.60576 58.15999 58.02872 55.61252 NA 52.88555 54.67982 54.53919 [9] 54.65467 54.30586 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.93170 72.22633 66.60536 70.12317 67.87504 72.34948 69.22155 [8] 72.85503 71.62992 67.59692 70.99975 69.98436 67.32844 NaN [15] 68.46108 71.82084 69.08602 74.20279 68.39379 71.41992 > colSums(tmp5,na.rm=TRUE) [1] 1007.3853 650.0369 599.4482 631.1085 610.8753 651.1453 622.9939 [8] 655.6953 644.6693 608.3723 638.9977 629.8593 605.9559 0.0000 [15] 616.1497 646.3875 621.7742 667.8251 615.5441 642.7793 > colVars(tmp5,na.rm=TRUE) [1] 17539.67454 22.77868 105.45690 142.56568 68.83397 45.47665 [7] 33.05249 68.73108 29.45115 58.56847 89.47409 26.51009 [13] 84.78869 NA 53.27113 105.08331 133.40924 103.47398 [19] 43.45284 45.02677 > colSd(tmp5,na.rm=TRUE) [1] 132.437436 4.772701 10.269221 11.940087 8.296624 6.743638 [7] 5.749129 8.290421 5.426892 7.653004 9.459074 5.148795 [13] 9.208077 NA 7.298707 10.251015 11.550292 10.172216 [19] 6.591877 6.710199 > colMax(tmp5,na.rm=TRUE) [1] 464.93162 80.07934 85.52375 91.42400 81.91843 84.83150 77.93796 [8] 84.76177 82.22026 77.10862 84.24205 76.21909 82.92047 -Inf [15] 75.88172 86.72882 90.10848 95.05307 81.53951 78.65260 > colMin(tmp5,na.rm=TRUE) [1] 61.54031 64.56875 54.67982 54.30586 56.64905 62.51949 62.72305 58.15999 [9] 63.73761 54.73633 54.65467 59.37807 54.53919 Inf 55.61252 58.56905 [17] 52.88555 60.65983 62.54602 58.02872 > > > > > 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] 209.4778 317.8701 294.4579 192.7194 273.9171 280.4183 254.1057 265.4108 [9] 248.3884 350.8883 > apply(copymatrix,1,var,na.rm=TRUE) [1] 209.4778 317.8701 294.4579 192.7194 273.9171 280.4183 254.1057 265.4108 [9] 248.3884 350.8883 > > > > 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.115908e-13 0.000000e+00 -1.421085e-14 0.000000e+00 1.421085e-13 [6] 2.842171e-14 0.000000e+00 -5.684342e-14 2.842171e-14 5.684342e-14 [11] -2.842171e-14 1.705303e-13 0.000000e+00 -1.421085e-13 -3.552714e-14 [16] 0.000000e+00 0.000000e+00 1.136868e-13 -4.973799e-14 -8.526513e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 8 18 7 14 3 16 7 8 9 4 4 2 4 13 6 18 6 13 6 15 4 16 8 5 2 5 10 19 2 10 7 5 10 3 1 17 4 19 5 13 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 1.964726 > Min(tmp) [1] -2.629792 > mean(tmp) [1] -0.09839841 > Sum(tmp) [1] -9.839841 > Var(tmp) [1] 0.945646 > > rowMeans(tmp) [1] -0.09839841 > rowSums(tmp) [1] -9.839841 > rowVars(tmp) [1] 0.945646 > rowSd(tmp) [1] 0.9724433 > rowMax(tmp) [1] 1.964726 > rowMin(tmp) [1] -2.629792 > > colMeans(tmp) [1] -1.216436325 -1.448982832 -0.006189000 1.432874435 -0.223121305 [6] 0.329703774 -0.411754091 -0.212425095 0.227229360 -0.284222875 [11] 0.555985125 -0.059584022 -0.106425602 -0.885936231 0.622159060 [16] -0.537691427 -1.240481388 -1.061980648 -0.142755533 1.141923744 [21] -2.153256578 0.102953796 -0.160683917 1.181283013 -0.750808376 [26] 0.870393392 -0.975768897 -0.544195802 1.161220675 -0.907506061 [31] 1.200429930 0.788663107 1.964725506 -0.031882785 -1.585580312 [36] 1.168013672 -2.629791617 0.115113346 0.598665254 -1.610054117 [41] -0.256728493 -0.937308623 0.532876253 -0.189362337 0.720097112 [46] 1.072907817 0.700390148 0.583340296 -1.186880066 -0.958438703 [51] -1.074937457 1.307998390 1.666581392 0.988467018 -0.955291358 [56] -0.235206067 -0.196471338 -0.200938776 -0.004956649 -2.303767538 [61] -0.755819779 0.499079977 -1.748109708 -1.463437516 -0.798345487 [66] 0.354079241 -0.432674917 -1.377906991 -0.231907520 0.856431330 [71] 0.728378584 0.625721338 -0.952200198 0.163918534 0.068706422 [76] -0.032852857 0.714704652 -0.691228907 1.835766309 1.019680229 [81] 1.180744060 -0.538100882 0.014876328 0.350825725 -0.491505653 [86] -1.121900313 0.935949848 0.996122282 -0.379473182 -0.883171126 [91] -0.717347666 -1.263794383 0.381692368 -0.567165286 0.207868951 [96] 0.467348807 -2.253108183 1.166259017 0.906520546 0.039341879 > colSums(tmp) [1] -1.216436325 -1.448982832 -0.006189000 1.432874435 -0.223121305 [6] 0.329703774 -0.411754091 -0.212425095 0.227229360 -0.284222875 [11] 0.555985125 -0.059584022 -0.106425602 -0.885936231 0.622159060 [16] -0.537691427 -1.240481388 -1.061980648 -0.142755533 1.141923744 [21] -2.153256578 0.102953796 -0.160683917 1.181283013 -0.750808376 [26] 0.870393392 -0.975768897 -0.544195802 1.161220675 -0.907506061 [31] 1.200429930 0.788663107 1.964725506 -0.031882785 -1.585580312 [36] 1.168013672 -2.629791617 0.115113346 0.598665254 -1.610054117 [41] -0.256728493 -0.937308623 0.532876253 -0.189362337 0.720097112 [46] 1.072907817 0.700390148 0.583340296 -1.186880066 -0.958438703 [51] -1.074937457 1.307998390 1.666581392 0.988467018 -0.955291358 [56] -0.235206067 -0.196471338 -0.200938776 -0.004956649 -2.303767538 [61] -0.755819779 0.499079977 -1.748109708 -1.463437516 -0.798345487 [66] 0.354079241 -0.432674917 -1.377906991 -0.231907520 0.856431330 [71] 0.728378584 0.625721338 -0.952200198 0.163918534 0.068706422 [76] -0.032852857 0.714704652 -0.691228907 1.835766309 1.019680229 [81] 1.180744060 -0.538100882 0.014876328 0.350825725 -0.491505653 [86] -1.121900313 0.935949848 0.996122282 -0.379473182 -0.883171126 [91] -0.717347666 -1.263794383 0.381692368 -0.567165286 0.207868951 [96] 0.467348807 -2.253108183 1.166259017 0.906520546 0.039341879 > 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.216436325 -1.448982832 -0.006189000 1.432874435 -0.223121305 [6] 0.329703774 -0.411754091 -0.212425095 0.227229360 -0.284222875 [11] 0.555985125 -0.059584022 -0.106425602 -0.885936231 0.622159060 [16] -0.537691427 -1.240481388 -1.061980648 -0.142755533 1.141923744 [21] -2.153256578 0.102953796 -0.160683917 1.181283013 -0.750808376 [26] 0.870393392 -0.975768897 -0.544195802 1.161220675 -0.907506061 [31] 1.200429930 0.788663107 1.964725506 -0.031882785 -1.585580312 [36] 1.168013672 -2.629791617 0.115113346 0.598665254 -1.610054117 [41] -0.256728493 -0.937308623 0.532876253 -0.189362337 0.720097112 [46] 1.072907817 0.700390148 0.583340296 -1.186880066 -0.958438703 [51] -1.074937457 1.307998390 1.666581392 0.988467018 -0.955291358 [56] -0.235206067 -0.196471338 -0.200938776 -0.004956649 -2.303767538 [61] -0.755819779 0.499079977 -1.748109708 -1.463437516 -0.798345487 [66] 0.354079241 -0.432674917 -1.377906991 -0.231907520 0.856431330 [71] 0.728378584 0.625721338 -0.952200198 0.163918534 0.068706422 [76] -0.032852857 0.714704652 -0.691228907 1.835766309 1.019680229 [81] 1.180744060 -0.538100882 0.014876328 0.350825725 -0.491505653 [86] -1.121900313 0.935949848 0.996122282 -0.379473182 -0.883171126 [91] -0.717347666 -1.263794383 0.381692368 -0.567165286 0.207868951 [96] 0.467348807 -2.253108183 1.166259017 0.906520546 0.039341879 > colMin(tmp) [1] -1.216436325 -1.448982832 -0.006189000 1.432874435 -0.223121305 [6] 0.329703774 -0.411754091 -0.212425095 0.227229360 -0.284222875 [11] 0.555985125 -0.059584022 -0.106425602 -0.885936231 0.622159060 [16] -0.537691427 -1.240481388 -1.061980648 -0.142755533 1.141923744 [21] -2.153256578 0.102953796 -0.160683917 1.181283013 -0.750808376 [26] 0.870393392 -0.975768897 -0.544195802 1.161220675 -0.907506061 [31] 1.200429930 0.788663107 1.964725506 -0.031882785 -1.585580312 [36] 1.168013672 -2.629791617 0.115113346 0.598665254 -1.610054117 [41] -0.256728493 -0.937308623 0.532876253 -0.189362337 0.720097112 [46] 1.072907817 0.700390148 0.583340296 -1.186880066 -0.958438703 [51] -1.074937457 1.307998390 1.666581392 0.988467018 -0.955291358 [56] -0.235206067 -0.196471338 -0.200938776 -0.004956649 -2.303767538 [61] -0.755819779 0.499079977 -1.748109708 -1.463437516 -0.798345487 [66] 0.354079241 -0.432674917 -1.377906991 -0.231907520 0.856431330 [71] 0.728378584 0.625721338 -0.952200198 0.163918534 0.068706422 [76] -0.032852857 0.714704652 -0.691228907 1.835766309 1.019680229 [81] 1.180744060 -0.538100882 0.014876328 0.350825725 -0.491505653 [86] -1.121900313 0.935949848 0.996122282 -0.379473182 -0.883171126 [91] -0.717347666 -1.263794383 0.381692368 -0.567165286 0.207868951 [96] 0.467348807 -2.253108183 1.166259017 0.906520546 0.039341879 > colMedians(tmp) [1] -1.216436325 -1.448982832 -0.006189000 1.432874435 -0.223121305 [6] 0.329703774 -0.411754091 -0.212425095 0.227229360 -0.284222875 [11] 0.555985125 -0.059584022 -0.106425602 -0.885936231 0.622159060 [16] -0.537691427 -1.240481388 -1.061980648 -0.142755533 1.141923744 [21] -2.153256578 0.102953796 -0.160683917 1.181283013 -0.750808376 [26] 0.870393392 -0.975768897 -0.544195802 1.161220675 -0.907506061 [31] 1.200429930 0.788663107 1.964725506 -0.031882785 -1.585580312 [36] 1.168013672 -2.629791617 0.115113346 0.598665254 -1.610054117 [41] -0.256728493 -0.937308623 0.532876253 -0.189362337 0.720097112 [46] 1.072907817 0.700390148 0.583340296 -1.186880066 -0.958438703 [51] -1.074937457 1.307998390 1.666581392 0.988467018 -0.955291358 [56] -0.235206067 -0.196471338 -0.200938776 -0.004956649 -2.303767538 [61] -0.755819779 0.499079977 -1.748109708 -1.463437516 -0.798345487 [66] 0.354079241 -0.432674917 -1.377906991 -0.231907520 0.856431330 [71] 0.728378584 0.625721338 -0.952200198 0.163918534 0.068706422 [76] -0.032852857 0.714704652 -0.691228907 1.835766309 1.019680229 [81] 1.180744060 -0.538100882 0.014876328 0.350825725 -0.491505653 [86] -1.121900313 0.935949848 0.996122282 -0.379473182 -0.883171126 [91] -0.717347666 -1.263794383 0.381692368 -0.567165286 0.207868951 [96] 0.467348807 -2.253108183 1.166259017 0.906520546 0.039341879 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.216436 -1.448983 -0.006189 1.432874 -0.2231213 0.3297038 -0.4117541 [2,] -1.216436 -1.448983 -0.006189 1.432874 -0.2231213 0.3297038 -0.4117541 [,8] [,9] [,10] [,11] [,12] [,13] [1,] -0.2124251 0.2272294 -0.2842229 0.5559851 -0.05958402 -0.1064256 [2,] -0.2124251 0.2272294 -0.2842229 0.5559851 -0.05958402 -0.1064256 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] -0.8859362 0.6221591 -0.5376914 -1.240481 -1.061981 -0.1427555 1.141924 [2,] -0.8859362 0.6221591 -0.5376914 -1.240481 -1.061981 -0.1427555 1.141924 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] -2.153257 0.1029538 -0.1606839 1.181283 -0.7508084 0.8703934 -0.9757689 [2,] -2.153257 0.1029538 -0.1606839 1.181283 -0.7508084 0.8703934 -0.9757689 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [1,] -0.5441958 1.161221 -0.9075061 1.20043 0.7886631 1.964726 -0.03188279 [2,] -0.5441958 1.161221 -0.9075061 1.20043 0.7886631 1.964726 -0.03188279 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] -1.58558 1.168014 -2.629792 0.1151133 0.5986653 -1.610054 -0.2567285 [2,] -1.58558 1.168014 -2.629792 0.1151133 0.5986653 -1.610054 -0.2567285 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -0.9373086 0.5328763 -0.1893623 0.7200971 1.072908 0.7003901 0.5833403 [2,] -0.9373086 0.5328763 -0.1893623 0.7200971 1.072908 0.7003901 0.5833403 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -1.18688 -0.9584387 -1.074937 1.307998 1.666581 0.988467 -0.9552914 [2,] -1.18688 -0.9584387 -1.074937 1.307998 1.666581 0.988467 -0.9552914 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] -0.2352061 -0.1964713 -0.2009388 -0.004956649 -2.303768 -0.7558198 0.49908 [2,] -0.2352061 -0.1964713 -0.2009388 -0.004956649 -2.303768 -0.7558198 0.49908 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -1.74811 -1.463438 -0.7983455 0.3540792 -0.4326749 -1.377907 -0.2319075 [2,] -1.74811 -1.463438 -0.7983455 0.3540792 -0.4326749 -1.377907 -0.2319075 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.8564313 0.7283786 0.6257213 -0.9522002 0.1639185 0.06870642 -0.03285286 [2,] 0.8564313 0.7283786 0.6257213 -0.9522002 0.1639185 0.06870642 -0.03285286 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] 0.7147047 -0.6912289 1.835766 1.01968 1.180744 -0.5381009 0.01487633 [2,] 0.7147047 -0.6912289 1.835766 1.01968 1.180744 -0.5381009 0.01487633 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 0.3508257 -0.4915057 -1.1219 0.9359498 0.9961223 -0.3794732 -0.8831711 [2,] 0.3508257 -0.4915057 -1.1219 0.9359498 0.9961223 -0.3794732 -0.8831711 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.7173477 -1.263794 0.3816924 -0.5671653 0.207869 0.4673488 -2.253108 [2,] -0.7173477 -1.263794 0.3816924 -0.5671653 0.207869 0.4673488 -2.253108 [,98] [,99] [,100] [1,] 1.166259 0.9065205 0.03934188 [2,] 1.166259 0.9065205 0.03934188 > > > Max(tmp2) [1] 2.829581 > Min(tmp2) [1] -2.192343 > mean(tmp2) [1] -0.03548685 > Sum(tmp2) [1] -3.548685 > Var(tmp2) [1] 0.9639027 > > rowMeans(tmp2) [1] 1.26131266 -0.05137176 -0.28056095 -0.63550839 -0.05465471 -0.75982598 [7] 1.48478031 0.27902889 -0.57616155 0.34931841 -1.43150349 -0.45189243 [13] -0.02505758 0.42101921 -0.65216380 0.06530771 0.46617424 -0.53946659 [19] -0.35171789 0.69284241 -0.15039137 0.85924414 1.30202882 -0.92048301 [25] -0.01062286 0.95189119 0.74934507 -1.70121907 0.70785496 -1.35772913 [31] 0.35500615 0.57822141 -1.70574244 -0.06698088 -0.16419609 0.86481001 [37] 0.74998999 -1.09874437 0.41286310 1.48265639 0.73320769 -1.42732343 [43] 0.64698608 -1.52058360 -1.71365568 -1.11152173 -0.07965402 0.07623418 [49] 1.18633495 -0.23969365 0.48044859 -1.54601271 0.94986261 1.25667813 [55] -1.13273586 -0.41989443 -2.13714051 -0.15315989 1.73684237 0.93163590 [61] 0.51704766 -1.37637286 0.31561578 0.82229071 -0.84548963 0.22244194 [67] -0.55622506 -2.19234261 0.08883879 0.70181148 -0.08413168 1.04633434 [73] -0.86739574 0.58811957 0.82862747 -0.47214945 0.70265807 0.01704160 [79] 1.41172975 0.36351295 -0.19323339 1.80028063 -1.84359325 0.59735324 [85] -0.77752960 0.83916755 0.89805723 0.31531228 0.02552841 2.82958072 [91] -0.88727000 -0.95159048 -1.63400784 -0.69063530 -0.27012550 -0.29248742 [97] 0.04882623 -1.72469759 0.65606502 -1.09020463 > rowSums(tmp2) [1] 1.26131266 -0.05137176 -0.28056095 -0.63550839 -0.05465471 -0.75982598 [7] 1.48478031 0.27902889 -0.57616155 0.34931841 -1.43150349 -0.45189243 [13] -0.02505758 0.42101921 -0.65216380 0.06530771 0.46617424 -0.53946659 [19] -0.35171789 0.69284241 -0.15039137 0.85924414 1.30202882 -0.92048301 [25] -0.01062286 0.95189119 0.74934507 -1.70121907 0.70785496 -1.35772913 [31] 0.35500615 0.57822141 -1.70574244 -0.06698088 -0.16419609 0.86481001 [37] 0.74998999 -1.09874437 0.41286310 1.48265639 0.73320769 -1.42732343 [43] 0.64698608 -1.52058360 -1.71365568 -1.11152173 -0.07965402 0.07623418 [49] 1.18633495 -0.23969365 0.48044859 -1.54601271 0.94986261 1.25667813 [55] -1.13273586 -0.41989443 -2.13714051 -0.15315989 1.73684237 0.93163590 [61] 0.51704766 -1.37637286 0.31561578 0.82229071 -0.84548963 0.22244194 [67] -0.55622506 -2.19234261 0.08883879 0.70181148 -0.08413168 1.04633434 [73] -0.86739574 0.58811957 0.82862747 -0.47214945 0.70265807 0.01704160 [79] 1.41172975 0.36351295 -0.19323339 1.80028063 -1.84359325 0.59735324 [85] -0.77752960 0.83916755 0.89805723 0.31531228 0.02552841 2.82958072 [91] -0.88727000 -0.95159048 -1.63400784 -0.69063530 -0.27012550 -0.29248742 [97] 0.04882623 -1.72469759 0.65606502 -1.09020463 > 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.26131266 -0.05137176 -0.28056095 -0.63550839 -0.05465471 -0.75982598 [7] 1.48478031 0.27902889 -0.57616155 0.34931841 -1.43150349 -0.45189243 [13] -0.02505758 0.42101921 -0.65216380 0.06530771 0.46617424 -0.53946659 [19] -0.35171789 0.69284241 -0.15039137 0.85924414 1.30202882 -0.92048301 [25] -0.01062286 0.95189119 0.74934507 -1.70121907 0.70785496 -1.35772913 [31] 0.35500615 0.57822141 -1.70574244 -0.06698088 -0.16419609 0.86481001 [37] 0.74998999 -1.09874437 0.41286310 1.48265639 0.73320769 -1.42732343 [43] 0.64698608 -1.52058360 -1.71365568 -1.11152173 -0.07965402 0.07623418 [49] 1.18633495 -0.23969365 0.48044859 -1.54601271 0.94986261 1.25667813 [55] -1.13273586 -0.41989443 -2.13714051 -0.15315989 1.73684237 0.93163590 [61] 0.51704766 -1.37637286 0.31561578 0.82229071 -0.84548963 0.22244194 [67] -0.55622506 -2.19234261 0.08883879 0.70181148 -0.08413168 1.04633434 [73] -0.86739574 0.58811957 0.82862747 -0.47214945 0.70265807 0.01704160 [79] 1.41172975 0.36351295 -0.19323339 1.80028063 -1.84359325 0.59735324 [85] -0.77752960 0.83916755 0.89805723 0.31531228 0.02552841 2.82958072 [91] -0.88727000 -0.95159048 -1.63400784 -0.69063530 -0.27012550 -0.29248742 [97] 0.04882623 -1.72469759 0.65606502 -1.09020463 > rowMin(tmp2) [1] 1.26131266 -0.05137176 -0.28056095 -0.63550839 -0.05465471 -0.75982598 [7] 1.48478031 0.27902889 -0.57616155 0.34931841 -1.43150349 -0.45189243 [13] -0.02505758 0.42101921 -0.65216380 0.06530771 0.46617424 -0.53946659 [19] -0.35171789 0.69284241 -0.15039137 0.85924414 1.30202882 -0.92048301 [25] -0.01062286 0.95189119 0.74934507 -1.70121907 0.70785496 -1.35772913 [31] 0.35500615 0.57822141 -1.70574244 -0.06698088 -0.16419609 0.86481001 [37] 0.74998999 -1.09874437 0.41286310 1.48265639 0.73320769 -1.42732343 [43] 0.64698608 -1.52058360 -1.71365568 -1.11152173 -0.07965402 0.07623418 [49] 1.18633495 -0.23969365 0.48044859 -1.54601271 0.94986261 1.25667813 [55] -1.13273586 -0.41989443 -2.13714051 -0.15315989 1.73684237 0.93163590 [61] 0.51704766 -1.37637286 0.31561578 0.82229071 -0.84548963 0.22244194 [67] -0.55622506 -2.19234261 0.08883879 0.70181148 -0.08413168 1.04633434 [73] -0.86739574 0.58811957 0.82862747 -0.47214945 0.70265807 0.01704160 [79] 1.41172975 0.36351295 -0.19323339 1.80028063 -1.84359325 0.59735324 [85] -0.77752960 0.83916755 0.89805723 0.31531228 0.02552841 2.82958072 [91] -0.88727000 -0.95159048 -1.63400784 -0.69063530 -0.27012550 -0.29248742 [97] 0.04882623 -1.72469759 0.65606502 -1.09020463 > > colMeans(tmp2) [1] -0.03548685 > colSums(tmp2) [1] -3.548685 > colVars(tmp2) [1] 0.9639027 > colSd(tmp2) [1] 0.9817855 > colMax(tmp2) [1] 2.829581 > colMin(tmp2) [1] -2.192343 > colMedians(tmp2) [1] 0.00320937 > colRanges(tmp2) [,1] [1,] -2.192343 [2,] 2.829581 > > 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.0281251 -4.5001390 -3.9665354 1.0401329 3.5970756 3.6332746 [7] -2.1258001 3.3255255 -0.7656663 2.3480773 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1111750 [2,] -0.7521559 [3,] 0.2114104 [4,] 1.0347049 [5,] 1.5134916 > > rowApply(tmp,sum) [1] 6.5296098 -4.0507872 -1.1527371 -0.8370941 3.7657534 2.3688943 [7] 0.2645570 2.0140539 -2.2447775 -2.0434023 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 9 2 3 4 7 8 10 10 4 [2,] 1 2 1 7 9 8 2 5 1 7 [3,] 6 7 10 1 5 1 5 4 3 2 [4,] 3 3 5 5 7 4 3 9 4 10 [5,] 9 10 9 8 10 5 6 6 7 1 [6,] 8 6 6 6 1 9 10 2 6 9 [7,] 10 4 7 4 2 3 1 3 9 3 [8,] 7 5 3 9 3 6 9 7 5 8 [9,] 4 1 8 2 6 10 4 1 8 5 [10,] 5 8 4 10 8 2 7 8 2 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -4.2536274338 -0.1085144141 -1.8296275070 -0.2890892058 1.5255918150 [6] -0.0025263692 0.5489051512 1.7954713138 -1.6490851560 -1.3190979866 [11] 1.3349441393 2.6648755105 -0.0004994011 -2.8289663050 2.0226451806 [16] 3.1917545566 -0.5499941028 1.4458104037 -0.2787169697 1.5121472503 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4766605 [2,] -0.8596481 [3,] -0.8013535 [4,] -0.6180206 [5,] -0.4979449 > > rowApply(tmp,sum) [1] -0.4142768 3.1346887 -4.1453358 1.9738810 2.3834434 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 4 4 3 1 [2,] 10 3 3 20 18 [3,] 3 7 14 12 2 [4,] 13 8 6 13 5 [5,] 9 11 20 7 16 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4979449 -0.3880748 -0.9135285 0.1538591 -0.3894198 0.7111745 [2,] -0.6180206 -1.0972692 -0.1501006 0.0456061 0.1983390 0.1891722 [3,] -0.8013535 -0.9060716 0.1152809 -0.5244263 1.3758071 -0.3685144 [4,] -0.8596481 1.3332778 0.1283765 0.6351124 -0.4574498 -1.3255744 [5,] -1.4766605 0.9496234 -1.0096558 -0.5992405 0.7983153 0.7912157 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1585066 0.8206017 -0.6725886 -0.7791056 1.18067060 0.87456582 [2,] 1.5536232 1.7601852 0.5909778 0.3843595 -1.74717768 0.36920324 [3,] -0.2037104 -1.6630305 -1.9257984 0.2617387 -0.07638186 0.04014318 [4,] -0.3750066 1.0472680 0.1236794 -0.5745670 0.64490296 0.91463030 [5,] -0.2674945 -0.1695530 0.2346447 -0.6115236 1.33293013 0.46633298 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.4525357 -0.95665076 -1.14156954 0.2147448 -0.8025154 1.59996811 [2,] 0.5338014 -1.50489093 1.58718183 1.1153156 0.6083698 0.09986645 [3,] -0.3065791 -0.09881954 0.44029101 0.7572294 0.2911161 0.38105848 [4,] 0.9164683 -0.11180392 -0.03868499 0.8931883 -0.7344918 -0.97876480 [5,] -0.6916544 -0.15680117 1.17542687 0.2112765 0.0875272 0.34368216 [,19] [,20] [1,] 1.28324429 -0.1006655 [2,] -0.35192543 -0.4319283 [3,] -0.76626500 -0.1670501 [4,] -0.47803658 1.2710051 [5,] 0.03426575 0.9407861 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 629 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 545 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.171849 0.4514875 1.447969 2.050952 0.1510072 0.006632123 0.6599275 col8 col9 col10 col11 col12 col13 col14 row1 0.8112005 -0.8776456 -0.1802047 -1.848621 -1.363681 -0.2236522 -1.722199 col15 col16 col17 col18 col19 col20 row1 1.547468 0.5449664 1.170618 0.41607 0.02002536 0.7400784 > tmp[,"col10"] col10 row1 -0.18020473 row2 -2.30814133 row3 -0.56208088 row4 1.82864211 row5 -0.07942178 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.171849 0.4514875 1.447969 2.0509518 0.1510072 0.006632123 0.6599275 row5 -0.670888 0.6855707 1.221012 -0.6931888 -1.3900634 0.874427133 1.8920352 col8 col9 col10 col11 col12 col13 row1 0.8112005 -0.8776456 -0.18020473 -1.848621 -1.3636808 -0.2236522 row5 -1.9293009 0.2520294 -0.07942178 1.553716 0.5533394 0.7831946 col14 col15 col16 col17 col18 col19 col20 row1 -1.722199 1.547468 0.5449664 1.170618 0.4160700 0.02002536 0.7400784 row5 -2.252603 -1.246692 -0.5124027 1.034842 0.7438943 0.39614809 -1.2508362 > tmp[,c("col6","col20")] col6 col20 row1 0.006632123 0.7400784 row2 0.886725154 -2.5880391 row3 0.511202736 1.2953558 row4 0.223003291 0.1379106 row5 0.874427133 -1.2508362 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.006632123 0.7400784 row5 0.874427133 -1.2508362 > > > > > 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.33348 52.5516 49.35943 48.51444 49.32051 105.7281 51.09736 51.42205 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.17134 49.80986 49.4818 49.87139 49.11703 50.38622 50.75096 48.51068 col17 col18 col19 col20 row1 51.40822 50.89286 51.17513 104.8445 > tmp[,"col10"] col10 row1 49.80986 row2 29.95324 row3 28.24116 row4 30.31555 row5 51.16254 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.33348 52.55160 49.35943 48.51444 49.32051 105.7281 51.09736 51.42205 row5 48.83583 51.06505 49.22774 51.13108 49.14013 105.5033 48.56215 48.13722 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.17134 49.80986 49.48180 49.87139 49.11703 50.38622 50.75096 48.51068 row5 52.27740 51.16254 51.25023 50.73316 50.02831 51.34355 48.96588 50.68976 col17 col18 col19 col20 row1 51.40822 50.89286 51.17513 104.8445 row5 52.44109 49.73256 49.34871 105.3067 > tmp[,c("col6","col20")] col6 col20 row1 105.72810 104.84448 row2 74.54474 74.06264 row3 73.56153 77.26376 row4 76.00341 74.10266 row5 105.50327 105.30669 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.7281 104.8445 row5 105.5033 105.3067 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.7281 104.8445 row5 105.5033 105.3067 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.87920946 [2,] -0.50373613 [3,] 0.06516665 [4,] -0.12243441 [5,] -2.10074245 > tmp[,c("col17","col7")] col17 col7 [1,] -0.88865646 0.1570154 [2,] -0.01731372 0.6755942 [3,] -0.41902067 1.6964509 [4,] 0.82849545 -0.9486233 [5,] 0.58528639 -0.6211855 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.002223953 -0.31256408 [2,] 2.021006030 -0.40349147 [3,] -2.281235090 -0.05408084 [4,] -2.174203542 0.00865705 [5,] 0.431858981 0.86226354 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.002223953 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.002223953 [2,] 2.021006030 > > > > 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.1498043 1.698565 1.5050886 -1.8633655 -0.1227842 0.09353179 1.0611336 row1 -0.2802478 0.544012 -0.2494872 -0.5477661 -0.7200283 -0.25554648 0.5193192 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.1508349 2.8655047 -1.988849 0.9162648 0.2732862 0.9054516 -0.5134999 row1 0.1580913 0.2157975 -2.589736 -0.7413619 1.3389426 0.1627523 -0.3434113 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.5586288 -0.1437371 1.5816336 -0.3677724 -1.203914 0.7223569 row1 -0.7080837 0.6710870 0.3671583 -1.0257088 -1.385618 0.6575604 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.7218054 -1.393475 -0.828127 0.2128507 1.388773 -0.7345309 -0.1442886 [,8] [,9] [,10] row2 -0.3035592 -0.01950437 0.2263057 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.4326875 1.496058 -0.2958303 -0.6467003 0.8079452 0.1510611 0.5361114 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.471131 -1.624175 0.01045721 -0.5146834 0.3347369 -0.1452475 -0.1750578 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.8353747 -1.215783 -2.192214 -0.08899414 -0.4446358 1.527295 > > > 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: 0x000001977b4fdf50> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc81f72785f" [2] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc842da4996" [3] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc811083d2e" [4] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc830f92dd5" [5] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc82bb71d1c" [6] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc86e7e1592" [7] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc86adc76e0" [8] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc82cd843d2" [9] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc83f7295b" [10] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc839f26f23" [11] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc864e3451e" [12] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc81baa3f3a" [13] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc8781d572c" [14] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc87f854ddb" [15] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM14bc84e95101" > > > ### 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: 0x000001977e0ff5f0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001977e0ff5f0> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.20-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001977e0ff5f0> > rowMedians(tmp) [1] -0.220276630 0.299149786 -0.458503466 0.609546887 0.637138691 [6] 0.538288584 -0.015771330 0.473714239 -0.380017579 0.227380771 [11] -0.244051687 0.440394047 -0.352513697 0.489121511 0.441737784 [16] 0.051412755 -0.646191487 -0.229454550 -0.144266870 -0.034851811 [21] -0.505323603 0.295332700 -0.424843598 0.069706062 -0.072452709 [26] 0.155767587 0.192627344 0.039485460 -0.195949714 0.433774996 [31] -0.110398155 0.225176123 0.192018794 -0.128671886 0.138665520 [36] 0.308957173 0.616575072 -0.186550140 -0.015064804 0.004025047 [41] -0.025932290 0.004994392 -0.161623447 -0.140289480 0.124742986 [46] 0.209924906 -0.261757814 0.646679257 0.529036208 -0.047096549 [51] -0.250688672 -0.139983401 0.283339177 0.012255958 0.283038856 [56] 0.081875806 0.061687763 -0.449034551 0.026810398 -0.032490045 [61] -0.140667664 -0.202887047 -0.333531433 0.620983252 0.118859565 [66] -0.209691020 -0.521888476 0.024321294 0.319839611 0.045225691 [71] -0.258443275 -0.062692233 0.353292963 -0.219143304 -0.360929503 [76] 0.200152278 -0.220549046 -0.126071859 0.066268056 -0.393856085 [81] -0.060982775 0.077288571 0.522179699 0.433991557 0.171611227 [86] -0.111409995 -0.298304344 -0.233690314 -0.141122820 0.271493213 [91] -0.003234854 -0.214790438 0.386340121 0.394112029 -0.478777442 [96] -0.024891669 -0.023274055 0.360484851 0.021640563 0.523453375 [101] 0.064194155 -0.801642831 -0.330830422 0.212065453 -0.033640003 [106] -0.266720288 0.834308269 0.152507976 -0.521012729 -0.496312054 [111] -0.112291914 0.225969166 -0.072596470 0.102589422 0.200522118 [116] -0.128468315 -0.184348469 -0.346760742 -0.144070933 -0.003214709 [121] -0.007563984 0.142895019 -0.495034512 0.137062002 -0.144784119 [126] -0.064952289 0.373185144 -0.312507757 0.080585273 -0.201285620 [131] 0.588766244 -0.084421553 -0.239510004 0.238762687 -0.192144537 [136] 0.180641767 -0.258016037 -0.210143662 0.585922503 0.357201942 [141] -0.356062247 -0.237968056 0.118817869 -0.193437839 -0.073180262 [146] 0.144651367 -0.176773171 -0.122080098 -0.025764933 -0.135413513 [151] -0.624719035 0.194593116 -0.415335473 -0.724165909 -0.175963297 [156] -0.376178363 -0.003832382 -0.405144322 0.601134557 0.134020847 [161] -0.103317690 0.476488653 -0.204414646 -0.232863900 0.129807594 [166] -0.646489558 0.462235628 0.429708712 0.306656361 0.243673859 [171] 0.504132293 -0.009364951 0.612305627 0.130507531 0.323811455 [176] -0.066988626 -0.312244756 0.273209492 -0.057687519 -0.429939837 [181] -0.006626665 0.161539063 0.308498387 -0.161538438 0.198312255 [186] 0.385192756 0.347711305 -0.313265522 -0.572898902 -0.435881922 [191] 0.059983360 0.278278502 0.013842562 0.108523034 0.323447490 [196] -0.237419019 0.018360734 0.361933174 -0.192653249 0.007357745 [201] 0.760814768 -0.043054462 0.129876156 -0.453778832 0.328334382 [206] 0.134936192 -0.159242879 -0.781782046 0.376910466 0.503964059 [211] 0.666981162 -0.519673877 0.065551943 0.012342155 0.295094082 [216] -0.192951385 0.033433525 0.093065539 -0.277244913 0.118777120 [221] -0.198963922 -0.171205755 -0.106469862 -0.702533580 -0.103582425 [226] 0.292682094 -0.461945766 0.080049327 -0.101948764 0.155183681 > > proc.time() user system elapsed 3.39 17.98 35.53
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x000001b1858f89b0> > .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: 0x000001b1858f89b0> > .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: 0x000001b1858f89b0> > .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: 0x000001b1858f89b0> > 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: 0x000001b1858f8d10> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1858f8d10> > .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: 0x000001b1858f8d10> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1858f8d10> > .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: 0x000001b1858f8d10> > 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: 0x000001b1858f8dd0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1858f8dd0> > .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: 0x000001b1858f8dd0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001b1858f8dd0> > .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: 0x000001b1858f8dd0> > > .Call("R_bm_RowMode",P) <pointer: 0x000001b1858f8dd0> > .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: 0x000001b1858f8dd0> > > .Call("R_bm_ColMode",P) <pointer: 0x000001b1858f8dd0> > .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: 0x000001b1858f8dd0> > 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: 0x000001b1858f8e30> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001b1858f8e30> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1858f8e30> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1858f8e30> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1e4206a186738" "BufferedMatrixFile1e42076b165e9" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1e4206a186738" "BufferedMatrixFile1e42076b165e9" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1872e4a10> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1872e4a10> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001b1872e4a10> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001b1872e4a10> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001b1872e4a10> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001b1872e4a10> > .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: 0x000001b1872e46b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001b1872e46b0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001b1872e46b0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001b1872e46b0> > 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: 0x000001b1872e47d0> > .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: 0x000001b1872e47d0> > rm(P) > > proc.time() user system elapsed 0.31 0.12 0.57
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.31 0.07 0.37