Back to Multiple platform build/check report for BioC 3.17: simplified long |
|
This page was generated on 2023-10-16 11:35:58 -0400 (Mon, 16 Oct 2023).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.2 LTS) | x86_64 | 4.3.1 (2023-06-16) -- "Beagle Scouts" | 4626 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" | 4379 |
merida1 | macOS 12.6.4 Monterey | x86_64 | 4.3.1 (2023-06-16) -- "Beagle Scouts" | 4395 |
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 245/2230 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.64.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.2 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.6.4 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson2 | macOS 12.6.1 Monterey / 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.64.0 |
Command: F:\biocbuild\bbs-3.17-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.17-bioc\R\library --no-vignettes --timings BufferedMatrix_1.64.0.tar.gz |
StartedAt: 2023-10-16 00:10:12 -0400 (Mon, 16 Oct 2023) |
EndedAt: 2023-10-16 00:11:13 -0400 (Mon, 16 Oct 2023) |
EllapsedTime: 61.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.17-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.17-bioc\R\library --no-vignettes --timings BufferedMatrix_1.64.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.3.1 (2023-06-16 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.2.0 GNU Fortran (GCC) 12.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.64.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.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 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.17-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.17-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.17-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.17-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 12.2.0' gcc -I"F:/biocbuild/bbs-3.17-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.17-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.17-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.17-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.17-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.17-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.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 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.23 0.25 0.54
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 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.17-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 454300 24.3 977590 52.3 640820 34.3 Vcells 825159 6.3 8388608 64.0 2002707 15.3 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Oct 16 00:10:35 2023" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Oct 16 00:10:36 2023" > > > 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: 0x000001e288b26fd0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Oct 16 00:10:41 2023" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Oct 16 00:10:43 2023" > > ColMode(tmp2) <pointer: 0x000001e288b26fd0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.8562344 0.3196729 1.25270208 -1.8588327 [2,] 1.3933733 -1.4089691 0.40048108 0.2778821 [3,] 0.1877901 -0.8010538 -0.26760984 1.4995236 [4,] -1.1746379 -0.5871921 0.08627554 1.6091802 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.17-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,] 99.8562344 0.3196729 1.25270208 1.8588327 [2,] 1.3933733 1.4089691 0.40048108 0.2778821 [3,] 0.1877901 0.8010538 0.26760984 1.4995236 [4,] 1.1746379 0.5871921 0.08627554 1.6091802 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.17-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.9928091 0.5653963 1.1192417 1.3633902 [2,] 1.1804124 1.1870000 0.6328357 0.5271453 [3,] 0.4333476 0.8950161 0.5173102 1.2245504 [4,] 1.0838071 0.7662846 0.2937270 1.2685347 > > 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.17-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,] 224.78433 30.97364 37.44512 40.49273 [2,] 38.19750 38.27897 31.72884 30.54933 [3,] 29.52127 34.75121 30.44071 38.74503 [4,] 37.01271 33.25004 28.02355 39.29453 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001e288b274a0> > exp(tmp5) <pointer: 0x000001e288b274a0> > log(tmp5,2) <pointer: 0x000001e288b274a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.8591 > Min(tmp5) [1] 54.71628 > mean(tmp5) [1] 72.96984 > Sum(tmp5) [1] 14593.97 > Var(tmp5) [1] 847.0584 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.19917 71.22949 70.35502 71.96188 71.04032 72.97520 71.40664 71.21150 [9] 68.24407 69.07515 > rowSums(tmp5) [1] 1843.983 1424.590 1407.100 1439.238 1420.806 1459.504 1428.133 1424.230 [9] 1364.881 1381.503 > rowVars(tmp5) [1] 7868.03532 60.60408 52.20032 53.63811 86.64270 54.17294 [7] 60.19740 51.01324 61.98419 73.42953 > rowSd(tmp5) [1] 88.701947 7.784862 7.224979 7.323805 9.308206 7.360227 7.758698 [8] 7.142355 7.873004 8.569103 > rowMax(tmp5) [1] 467.85912 85.19878 82.55517 84.25649 87.18645 89.12406 82.69489 [8] 85.34139 81.76527 83.15810 > rowMin(tmp5) [1] 59.73652 54.71628 58.25588 55.87584 55.18679 58.02704 55.83554 57.84785 [9] 55.55461 55.21545 > > colMeans(tmp5) [1] 109.54100 74.60000 72.07061 73.62620 69.61562 69.71432 69.00417 [8] 67.21886 69.27340 72.30131 72.56909 73.77451 67.78756 66.46985 [15] 71.40563 70.92317 67.44463 73.46580 74.69072 73.90039 > colSums(tmp5) [1] 1095.4100 746.0000 720.7061 736.2620 696.1562 697.1432 690.0417 [8] 672.1886 692.7340 723.0131 725.6909 737.7451 677.8756 664.6985 [15] 714.0563 709.2317 674.4463 734.6580 746.9072 739.0039 > colVars(tmp5) [1] 15912.82361 40.38724 92.78810 76.16088 50.10867 51.53447 [7] 41.21022 50.93710 59.80885 41.09912 83.39971 105.09440 [13] 67.83375 48.88548 16.00807 51.65617 45.92629 60.78810 [19] 48.16645 76.72132 > colSd(tmp5) [1] 126.146041 6.355095 9.632658 8.727020 7.078748 7.178752 [7] 6.419519 7.137023 7.733618 6.410860 9.132344 10.251556 [13] 8.236125 6.991815 4.001008 7.187223 6.776894 7.796672 [19] 6.940205 8.759071 > colMax(tmp5) [1] 467.85912 87.18645 83.10027 84.28032 82.69489 81.73657 83.15810 [8] 79.02364 80.21698 80.28176 85.34139 89.12406 81.95323 75.11659 [15] 75.59324 81.76527 76.49639 85.19878 84.25649 83.32770 > colMin(tmp5) [1] 55.55461 64.46756 58.32734 61.17854 56.85781 55.83554 62.01469 56.89018 [9] 58.61665 58.02704 58.50990 55.94346 55.87584 55.21545 63.94086 62.01731 [17] 54.71628 63.19930 62.34831 55.18679 > > > ### 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.19917 71.22949 70.35502 71.96188 71.04032 72.97520 71.40664 71.21150 [9] NA 69.07515 > rowSums(tmp5) [1] 1843.983 1424.590 1407.100 1439.238 1420.806 1459.504 1428.133 1424.230 [9] NA 1381.503 > rowVars(tmp5) [1] 7868.03532 60.60408 52.20032 53.63811 86.64270 54.17294 [7] 60.19740 51.01324 65.16743 73.42953 > rowSd(tmp5) [1] 88.701947 7.784862 7.224979 7.323805 9.308206 7.360227 7.758698 [8] 7.142355 8.072634 8.569103 > rowMax(tmp5) [1] 467.85912 85.19878 82.55517 84.25649 87.18645 89.12406 82.69489 [8] 85.34139 NA 83.15810 > rowMin(tmp5) [1] 59.73652 54.71628 58.25588 55.87584 55.18679 58.02704 55.83554 57.84785 [9] NA 55.21545 > > colMeans(tmp5) [1] 109.54100 74.60000 NA 73.62620 69.61562 69.71432 69.00417 [8] 67.21886 69.27340 72.30131 72.56909 73.77451 67.78756 66.46985 [15] 71.40563 70.92317 67.44463 73.46580 74.69072 73.90039 > colSums(tmp5) [1] 1095.4100 746.0000 NA 736.2620 696.1562 697.1432 690.0417 [8] 672.1886 692.7340 723.0131 725.6909 737.7451 677.8756 664.6985 [15] 714.0563 709.2317 674.4463 734.6580 746.9072 739.0039 > colVars(tmp5) [1] 15912.82361 40.38724 NA 76.16088 50.10867 51.53447 [7] 41.21022 50.93710 59.80885 41.09912 83.39971 105.09440 [13] 67.83375 48.88548 16.00807 51.65617 45.92629 60.78810 [19] 48.16645 76.72132 > colSd(tmp5) [1] 126.146041 6.355095 NA 8.727020 7.078748 7.178752 [7] 6.419519 7.137023 7.733618 6.410860 9.132344 10.251556 [13] 8.236125 6.991815 4.001008 7.187223 6.776894 7.796672 [19] 6.940205 8.759071 > colMax(tmp5) [1] 467.85912 87.18645 NA 84.28032 82.69489 81.73657 83.15810 [8] 79.02364 80.21698 80.28176 85.34139 89.12406 81.95323 75.11659 [15] 75.59324 81.76527 76.49639 85.19878 84.25649 83.32770 > colMin(tmp5) [1] 55.55461 64.46756 NA 61.17854 56.85781 55.83554 62.01469 56.89018 [9] 58.61665 58.02704 58.50990 55.94346 55.87584 55.21545 63.94086 62.01731 [17] 54.71628 63.19930 62.34831 55.18679 > > Max(tmp5,na.rm=TRUE) [1] 467.8591 > Min(tmp5,na.rm=TRUE) [1] 54.71628 > mean(tmp5,na.rm=TRUE) [1] 72.98299 > Sum(tmp5,na.rm=TRUE) [1] 14523.61 > Var(tmp5,na.rm=TRUE) [1] 851.3017 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.19917 71.22949 70.35502 71.96188 71.04032 72.97520 71.40664 71.21150 [9] 68.13302 69.07515 > rowSums(tmp5,na.rm=TRUE) [1] 1843.983 1424.590 1407.100 1439.238 1420.806 1459.504 1428.133 1424.230 [9] 1294.527 1381.503 > rowVars(tmp5,na.rm=TRUE) [1] 7868.03532 60.60408 52.20032 53.63811 86.64270 54.17294 [7] 60.19740 51.01324 65.16743 73.42953 > rowSd(tmp5,na.rm=TRUE) [1] 88.701947 7.784862 7.224979 7.323805 9.308206 7.360227 7.758698 [8] 7.142355 8.072634 8.569103 > rowMax(tmp5,na.rm=TRUE) [1] 467.85912 85.19878 82.55517 84.25649 87.18645 89.12406 82.69489 [8] 85.34139 81.76527 83.15810 > rowMin(tmp5,na.rm=TRUE) [1] 59.73652 54.71628 58.25588 55.87584 55.18679 58.02704 55.83554 57.84785 [9] 55.55461 55.21545 > > colMeans(tmp5,na.rm=TRUE) [1] 109.54100 74.60000 72.26135 73.62620 69.61562 69.71432 69.00417 [8] 67.21886 69.27340 72.30131 72.56909 73.77451 67.78756 66.46985 [15] 71.40563 70.92317 67.44463 73.46580 74.69072 73.90039 > colSums(tmp5,na.rm=TRUE) [1] 1095.4100 746.0000 650.3522 736.2620 696.1562 697.1432 690.0417 [8] 672.1886 692.7340 723.0131 725.6909 737.7451 677.8756 664.6985 [15] 714.0563 709.2317 674.4463 734.6580 746.9072 739.0039 > colVars(tmp5,na.rm=TRUE) [1] 15912.82361 40.38724 103.97732 76.16088 50.10867 51.53447 [7] 41.21022 50.93710 59.80885 41.09912 83.39971 105.09440 [13] 67.83375 48.88548 16.00807 51.65617 45.92629 60.78810 [19] 48.16645 76.72132 > colSd(tmp5,na.rm=TRUE) [1] 126.146041 6.355095 10.196927 8.727020 7.078748 7.178752 [7] 6.419519 7.137023 7.733618 6.410860 9.132344 10.251556 [13] 8.236125 6.991815 4.001008 7.187223 6.776894 7.796672 [19] 6.940205 8.759071 > colMax(tmp5,na.rm=TRUE) [1] 467.85912 87.18645 83.10027 84.28032 82.69489 81.73657 83.15810 [8] 79.02364 80.21698 80.28176 85.34139 89.12406 81.95323 75.11659 [15] 75.59324 81.76527 76.49639 85.19878 84.25649 83.32770 > colMin(tmp5,na.rm=TRUE) [1] 55.55461 64.46756 58.32734 61.17854 56.85781 55.83554 62.01469 56.89018 [9] 58.61665 58.02704 58.50990 55.94346 55.87584 55.21545 63.94086 62.01731 [17] 54.71628 63.19930 62.34831 55.18679 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.19917 71.22949 70.35502 71.96188 71.04032 72.97520 71.40664 71.21150 [9] NaN 69.07515 > rowSums(tmp5,na.rm=TRUE) [1] 1843.983 1424.590 1407.100 1439.238 1420.806 1459.504 1428.133 1424.230 [9] 0.000 1381.503 > rowVars(tmp5,na.rm=TRUE) [1] 7868.03532 60.60408 52.20032 53.63811 86.64270 54.17294 [7] 60.19740 51.01324 NA 73.42953 > rowSd(tmp5,na.rm=TRUE) [1] 88.701947 7.784862 7.224979 7.323805 9.308206 7.360227 7.758698 [8] 7.142355 NA 8.569103 > rowMax(tmp5,na.rm=TRUE) [1] 467.85912 85.19878 82.55517 84.25649 87.18645 89.12406 82.69489 [8] 85.34139 NA 83.15810 > rowMin(tmp5,na.rm=TRUE) [1] 59.73652 54.71628 58.25588 55.87584 55.18679 58.02704 55.83554 57.84785 [9] NA 55.21545 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.53949 74.49903 NaN 73.06683 71.03316 69.57794 69.21154 [8] 67.69400 70.45748 72.37616 72.36506 75.75574 67.13332 66.35182 [15] 71.55632 69.71849 68.24674 74.31558 75.34670 73.39182 > colSums(tmp5,na.rm=TRUE) [1] 1039.8554 670.4912 0.0000 657.6015 639.2984 626.2015 622.9039 [8] 609.2460 634.1173 651.3854 651.2855 681.8017 604.1999 597.1664 [15] 644.0069 627.4664 614.2207 668.8402 678.1203 660.5264 > colVars(tmp5,na.rm=TRUE) [1] 17497.13069 45.32094 NA 82.16095 33.76645 57.76706 [7] 45.87774 54.76448 51.51186 46.17350 93.35637 74.07197 [13] 71.49769 54.83944 17.75361 41.78665 44.42902 60.26270 [19] 49.34634 83.40173 > colSd(tmp5,na.rm=TRUE) [1] 132.276720 6.732083 NA 9.064268 5.810890 7.600464 [7] 6.773310 7.400303 7.177176 6.795108 9.662110 8.606508 [13] 8.455630 7.405366 4.213503 6.464260 6.665510 7.762906 [19] 7.024695 9.132455 > colMax(tmp5,na.rm=TRUE) [1] 467.85912 87.18645 -Inf 84.28032 82.69489 81.73657 83.15810 [8] 79.02364 80.21698 80.28176 85.34139 89.12406 81.95323 75.11659 [15] 75.59324 79.58545 76.49639 85.19878 84.25649 83.32770 > colMin(tmp5,na.rm=TRUE) [1] 61.44465 64.46756 Inf 61.17854 61.98092 55.83554 62.01469 56.89018 [9] 60.79285 58.02704 58.50990 64.71498 55.87584 55.21545 63.94086 62.01731 [17] 54.71628 63.19930 62.34831 55.18679 > > > > > 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] 194.3700 376.7189 181.8782 146.4474 234.5499 185.1146 202.8558 163.2405 [9] 132.4411 333.5689 > apply(copymatrix,1,var,na.rm=TRUE) [1] 194.3700 376.7189 181.8782 146.4474 234.5499 185.1146 202.8558 163.2405 [9] 132.4411 333.5689 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -2.842171e-14 1.989520e-13 -1.421085e-13 1.136868e-13 2.842171e-14 [6] -2.273737e-13 2.842171e-14 -1.136868e-13 5.684342e-14 -1.421085e-13 [11] 1.705303e-13 0.000000e+00 -8.526513e-14 -5.684342e-14 1.136868e-13 [16] 5.684342e-14 1.705303e-13 -2.273737e-13 -2.273737e-13 -1.136868e-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) + } 10 17 4 14 5 1 3 14 3 15 8 10 9 16 7 14 4 12 10 5 8 11 10 11 3 8 10 16 7 11 7 20 5 8 5 10 6 9 10 2 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 3.304863 > Min(tmp) [1] -2.527198 > mean(tmp) [1] -0.1938976 > Sum(tmp) [1] -19.38976 > Var(tmp) [1] 1.127741 > > rowMeans(tmp) [1] -0.1938976 > rowSums(tmp) [1] -19.38976 > rowVars(tmp) [1] 1.127741 > rowSd(tmp) [1] 1.061951 > rowMax(tmp) [1] 3.304863 > rowMin(tmp) [1] -2.527198 > > colMeans(tmp) [1] -0.126650629 -0.199048410 -0.868172734 -0.403447990 -0.711208385 [6] -2.174133959 0.764052499 -1.120286035 -1.887160874 0.220144738 [11] -0.794719192 -0.536324814 0.985771104 -0.713963744 1.054207348 [16] 0.687069896 0.974369037 1.229847676 0.939827316 -1.019816662 [21] 1.433291862 -0.601445004 -0.947719715 0.149869985 2.254371865 [26] 0.241008179 -1.026255909 -0.419595499 1.044282335 -2.527197790 [31] 1.170851655 -0.296187510 -0.537104586 3.304862729 -2.460036044 [36] -0.255322134 -1.112095976 1.171570309 -0.157954206 -1.311340606 [41] -1.865207776 0.483888579 -0.256834592 -0.274752753 1.257462593 [46] -1.144545068 -0.262084952 -0.008836457 0.351573431 -1.296311672 [51] -1.163299648 -0.872438076 -1.278818956 0.447908937 -0.947949887 [56] -1.693420501 1.390362430 1.039924164 -0.068883879 1.159419070 [61] -0.615287202 -0.537555123 -0.191958355 -0.558386493 0.759175362 [66] 0.429709492 -1.716426206 1.058676020 -0.357939525 0.895771642 [71] 1.155030203 -1.032517806 0.385684701 0.269776445 1.614170292 [76] -0.013509494 -1.256334975 -0.329999082 -0.057568294 -0.795830895 [81] -1.632147487 0.442721725 0.379718633 0.945064766 0.071453859 [86] -0.367322152 -1.738521046 -1.282950518 -1.629185354 -0.133781984 [91] -0.345169119 -0.361878850 0.230579355 0.647288473 -0.904189362 [96] 0.925849523 -1.703944508 -0.856430718 -1.619397072 0.022435468 > colSums(tmp) [1] -0.126650629 -0.199048410 -0.868172734 -0.403447990 -0.711208385 [6] -2.174133959 0.764052499 -1.120286035 -1.887160874 0.220144738 [11] -0.794719192 -0.536324814 0.985771104 -0.713963744 1.054207348 [16] 0.687069896 0.974369037 1.229847676 0.939827316 -1.019816662 [21] 1.433291862 -0.601445004 -0.947719715 0.149869985 2.254371865 [26] 0.241008179 -1.026255909 -0.419595499 1.044282335 -2.527197790 [31] 1.170851655 -0.296187510 -0.537104586 3.304862729 -2.460036044 [36] -0.255322134 -1.112095976 1.171570309 -0.157954206 -1.311340606 [41] -1.865207776 0.483888579 -0.256834592 -0.274752753 1.257462593 [46] -1.144545068 -0.262084952 -0.008836457 0.351573431 -1.296311672 [51] -1.163299648 -0.872438076 -1.278818956 0.447908937 -0.947949887 [56] -1.693420501 1.390362430 1.039924164 -0.068883879 1.159419070 [61] -0.615287202 -0.537555123 -0.191958355 -0.558386493 0.759175362 [66] 0.429709492 -1.716426206 1.058676020 -0.357939525 0.895771642 [71] 1.155030203 -1.032517806 0.385684701 0.269776445 1.614170292 [76] -0.013509494 -1.256334975 -0.329999082 -0.057568294 -0.795830895 [81] -1.632147487 0.442721725 0.379718633 0.945064766 0.071453859 [86] -0.367322152 -1.738521046 -1.282950518 -1.629185354 -0.133781984 [91] -0.345169119 -0.361878850 0.230579355 0.647288473 -0.904189362 [96] 0.925849523 -1.703944508 -0.856430718 -1.619397072 0.022435468 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.126650629 -0.199048410 -0.868172734 -0.403447990 -0.711208385 [6] -2.174133959 0.764052499 -1.120286035 -1.887160874 0.220144738 [11] -0.794719192 -0.536324814 0.985771104 -0.713963744 1.054207348 [16] 0.687069896 0.974369037 1.229847676 0.939827316 -1.019816662 [21] 1.433291862 -0.601445004 -0.947719715 0.149869985 2.254371865 [26] 0.241008179 -1.026255909 -0.419595499 1.044282335 -2.527197790 [31] 1.170851655 -0.296187510 -0.537104586 3.304862729 -2.460036044 [36] -0.255322134 -1.112095976 1.171570309 -0.157954206 -1.311340606 [41] -1.865207776 0.483888579 -0.256834592 -0.274752753 1.257462593 [46] -1.144545068 -0.262084952 -0.008836457 0.351573431 -1.296311672 [51] -1.163299648 -0.872438076 -1.278818956 0.447908937 -0.947949887 [56] -1.693420501 1.390362430 1.039924164 -0.068883879 1.159419070 [61] -0.615287202 -0.537555123 -0.191958355 -0.558386493 0.759175362 [66] 0.429709492 -1.716426206 1.058676020 -0.357939525 0.895771642 [71] 1.155030203 -1.032517806 0.385684701 0.269776445 1.614170292 [76] -0.013509494 -1.256334975 -0.329999082 -0.057568294 -0.795830895 [81] -1.632147487 0.442721725 0.379718633 0.945064766 0.071453859 [86] -0.367322152 -1.738521046 -1.282950518 -1.629185354 -0.133781984 [91] -0.345169119 -0.361878850 0.230579355 0.647288473 -0.904189362 [96] 0.925849523 -1.703944508 -0.856430718 -1.619397072 0.022435468 > colMin(tmp) [1] -0.126650629 -0.199048410 -0.868172734 -0.403447990 -0.711208385 [6] -2.174133959 0.764052499 -1.120286035 -1.887160874 0.220144738 [11] -0.794719192 -0.536324814 0.985771104 -0.713963744 1.054207348 [16] 0.687069896 0.974369037 1.229847676 0.939827316 -1.019816662 [21] 1.433291862 -0.601445004 -0.947719715 0.149869985 2.254371865 [26] 0.241008179 -1.026255909 -0.419595499 1.044282335 -2.527197790 [31] 1.170851655 -0.296187510 -0.537104586 3.304862729 -2.460036044 [36] -0.255322134 -1.112095976 1.171570309 -0.157954206 -1.311340606 [41] -1.865207776 0.483888579 -0.256834592 -0.274752753 1.257462593 [46] -1.144545068 -0.262084952 -0.008836457 0.351573431 -1.296311672 [51] -1.163299648 -0.872438076 -1.278818956 0.447908937 -0.947949887 [56] -1.693420501 1.390362430 1.039924164 -0.068883879 1.159419070 [61] -0.615287202 -0.537555123 -0.191958355 -0.558386493 0.759175362 [66] 0.429709492 -1.716426206 1.058676020 -0.357939525 0.895771642 [71] 1.155030203 -1.032517806 0.385684701 0.269776445 1.614170292 [76] -0.013509494 -1.256334975 -0.329999082 -0.057568294 -0.795830895 [81] -1.632147487 0.442721725 0.379718633 0.945064766 0.071453859 [86] -0.367322152 -1.738521046 -1.282950518 -1.629185354 -0.133781984 [91] -0.345169119 -0.361878850 0.230579355 0.647288473 -0.904189362 [96] 0.925849523 -1.703944508 -0.856430718 -1.619397072 0.022435468 > colMedians(tmp) [1] -0.126650629 -0.199048410 -0.868172734 -0.403447990 -0.711208385 [6] -2.174133959 0.764052499 -1.120286035 -1.887160874 0.220144738 [11] -0.794719192 -0.536324814 0.985771104 -0.713963744 1.054207348 [16] 0.687069896 0.974369037 1.229847676 0.939827316 -1.019816662 [21] 1.433291862 -0.601445004 -0.947719715 0.149869985 2.254371865 [26] 0.241008179 -1.026255909 -0.419595499 1.044282335 -2.527197790 [31] 1.170851655 -0.296187510 -0.537104586 3.304862729 -2.460036044 [36] -0.255322134 -1.112095976 1.171570309 -0.157954206 -1.311340606 [41] -1.865207776 0.483888579 -0.256834592 -0.274752753 1.257462593 [46] -1.144545068 -0.262084952 -0.008836457 0.351573431 -1.296311672 [51] -1.163299648 -0.872438076 -1.278818956 0.447908937 -0.947949887 [56] -1.693420501 1.390362430 1.039924164 -0.068883879 1.159419070 [61] -0.615287202 -0.537555123 -0.191958355 -0.558386493 0.759175362 [66] 0.429709492 -1.716426206 1.058676020 -0.357939525 0.895771642 [71] 1.155030203 -1.032517806 0.385684701 0.269776445 1.614170292 [76] -0.013509494 -1.256334975 -0.329999082 -0.057568294 -0.795830895 [81] -1.632147487 0.442721725 0.379718633 0.945064766 0.071453859 [86] -0.367322152 -1.738521046 -1.282950518 -1.629185354 -0.133781984 [91] -0.345169119 -0.361878850 0.230579355 0.647288473 -0.904189362 [96] 0.925849523 -1.703944508 -0.856430718 -1.619397072 0.022435468 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.1266506 -0.1990484 -0.8681727 -0.403448 -0.7112084 -2.174134 0.7640525 [2,] -0.1266506 -0.1990484 -0.8681727 -0.403448 -0.7112084 -2.174134 0.7640525 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.120286 -1.887161 0.2201447 -0.7947192 -0.5363248 0.9857711 -0.7139637 [2,] -1.120286 -1.887161 0.2201447 -0.7947192 -0.5363248 0.9857711 -0.7139637 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.054207 0.6870699 0.974369 1.229848 0.9398273 -1.019817 1.433292 [2,] 1.054207 0.6870699 0.974369 1.229848 0.9398273 -1.019817 1.433292 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.601445 -0.9477197 0.14987 2.254372 0.2410082 -1.026256 -0.4195955 [2,] -0.601445 -0.9477197 0.14987 2.254372 0.2410082 -1.026256 -0.4195955 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.044282 -2.527198 1.170852 -0.2961875 -0.5371046 3.304863 -2.460036 [2,] 1.044282 -2.527198 1.170852 -0.2961875 -0.5371046 3.304863 -2.460036 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.2553221 -1.112096 1.17157 -0.1579542 -1.311341 -1.865208 0.4838886 [2,] -0.2553221 -1.112096 1.17157 -0.1579542 -1.311341 -1.865208 0.4838886 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.2568346 -0.2747528 1.257463 -1.144545 -0.262085 -0.008836457 0.3515734 [2,] -0.2568346 -0.2747528 1.257463 -1.144545 -0.262085 -0.008836457 0.3515734 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.296312 -1.1633 -0.8724381 -1.278819 0.4479089 -0.9479499 -1.693421 [2,] -1.296312 -1.1633 -0.8724381 -1.278819 0.4479089 -0.9479499 -1.693421 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.390362 1.039924 -0.06888388 1.159419 -0.6152872 -0.5375551 -0.1919584 [2,] 1.390362 1.039924 -0.06888388 1.159419 -0.6152872 -0.5375551 -0.1919584 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.5583865 0.7591754 0.4297095 -1.716426 1.058676 -0.3579395 0.8957716 [2,] -0.5583865 0.7591754 0.4297095 -1.716426 1.058676 -0.3579395 0.8957716 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.15503 -1.032518 0.3856847 0.2697764 1.61417 -0.01350949 -1.256335 [2,] 1.15503 -1.032518 0.3856847 0.2697764 1.61417 -0.01350949 -1.256335 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.3299991 -0.05756829 -0.7958309 -1.632147 0.4427217 0.3797186 0.9450648 [2,] -0.3299991 -0.05756829 -0.7958309 -1.632147 0.4427217 0.3797186 0.9450648 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.07145386 -0.3673222 -1.738521 -1.282951 -1.629185 -0.133782 -0.3451691 [2,] 0.07145386 -0.3673222 -1.738521 -1.282951 -1.629185 -0.133782 -0.3451691 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.3618788 0.2305794 0.6472885 -0.9041894 0.9258495 -1.703945 -0.8564307 [2,] -0.3618788 0.2305794 0.6472885 -0.9041894 0.9258495 -1.703945 -0.8564307 [,99] [,100] [1,] -1.619397 0.02243547 [2,] -1.619397 0.02243547 > > > Max(tmp2) [1] 2.161284 > Min(tmp2) [1] -3.103854 > mean(tmp2) [1] 0.009090756 > Sum(tmp2) [1] 0.9090756 > Var(tmp2) [1] 1.144747 > > rowMeans(tmp2) [1] -3.10385359 -0.35283922 -1.85877861 -0.04529194 -0.63996183 -0.12451772 [7] 0.68777985 -0.66558497 -0.60777155 0.20424768 -0.51002194 1.49385406 [13] 0.56624538 1.17569584 1.25041614 -0.48574906 0.75820429 0.24178982 [19] -2.11672892 0.54063001 0.04138854 -0.86975727 0.52415766 -0.64179422 [25] 0.56325245 0.77153321 1.43538026 -1.00417949 0.03271116 0.03070315 [31] -0.45652820 -0.51540055 -1.01051949 -1.07838544 0.55420110 0.14525426 [37] -1.61397404 -0.09861646 -1.78259562 0.81848613 -1.33680863 0.35229071 [43] 0.88414320 0.27273291 -0.88517783 0.64975024 2.16128352 -1.92811422 [49] 1.44724047 0.94597283 1.28736844 1.28126711 0.44416846 0.89811852 [55] -0.64841936 -0.98075369 -0.02867285 1.37356971 -0.50619844 0.94476377 [61] -0.68163264 0.40382488 1.03326974 0.19850278 0.23389805 1.22135979 [67] 1.38664492 0.67771289 0.49501995 -0.88080609 -0.03501748 -0.85928749 [73] -0.72305174 -1.21350758 0.91227335 1.52956679 -0.39126508 -0.96765270 [79] 0.22061632 0.94640819 -0.89592927 1.05029796 -1.21013814 1.84613310 [85] -0.42679705 1.24204011 0.11797975 -0.82198696 1.17618393 0.30799441 [91] 1.05983566 -1.24214874 1.17242405 -0.25138313 0.50742331 -0.84240957 [97] -2.01243020 -2.84119755 1.92954388 -1.34484246 > rowSums(tmp2) [1] -3.10385359 -0.35283922 -1.85877861 -0.04529194 -0.63996183 -0.12451772 [7] 0.68777985 -0.66558497 -0.60777155 0.20424768 -0.51002194 1.49385406 [13] 0.56624538 1.17569584 1.25041614 -0.48574906 0.75820429 0.24178982 [19] -2.11672892 0.54063001 0.04138854 -0.86975727 0.52415766 -0.64179422 [25] 0.56325245 0.77153321 1.43538026 -1.00417949 0.03271116 0.03070315 [31] -0.45652820 -0.51540055 -1.01051949 -1.07838544 0.55420110 0.14525426 [37] -1.61397404 -0.09861646 -1.78259562 0.81848613 -1.33680863 0.35229071 [43] 0.88414320 0.27273291 -0.88517783 0.64975024 2.16128352 -1.92811422 [49] 1.44724047 0.94597283 1.28736844 1.28126711 0.44416846 0.89811852 [55] -0.64841936 -0.98075369 -0.02867285 1.37356971 -0.50619844 0.94476377 [61] -0.68163264 0.40382488 1.03326974 0.19850278 0.23389805 1.22135979 [67] 1.38664492 0.67771289 0.49501995 -0.88080609 -0.03501748 -0.85928749 [73] -0.72305174 -1.21350758 0.91227335 1.52956679 -0.39126508 -0.96765270 [79] 0.22061632 0.94640819 -0.89592927 1.05029796 -1.21013814 1.84613310 [85] -0.42679705 1.24204011 0.11797975 -0.82198696 1.17618393 0.30799441 [91] 1.05983566 -1.24214874 1.17242405 -0.25138313 0.50742331 -0.84240957 [97] -2.01243020 -2.84119755 1.92954388 -1.34484246 > 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] -3.10385359 -0.35283922 -1.85877861 -0.04529194 -0.63996183 -0.12451772 [7] 0.68777985 -0.66558497 -0.60777155 0.20424768 -0.51002194 1.49385406 [13] 0.56624538 1.17569584 1.25041614 -0.48574906 0.75820429 0.24178982 [19] -2.11672892 0.54063001 0.04138854 -0.86975727 0.52415766 -0.64179422 [25] 0.56325245 0.77153321 1.43538026 -1.00417949 0.03271116 0.03070315 [31] -0.45652820 -0.51540055 -1.01051949 -1.07838544 0.55420110 0.14525426 [37] -1.61397404 -0.09861646 -1.78259562 0.81848613 -1.33680863 0.35229071 [43] 0.88414320 0.27273291 -0.88517783 0.64975024 2.16128352 -1.92811422 [49] 1.44724047 0.94597283 1.28736844 1.28126711 0.44416846 0.89811852 [55] -0.64841936 -0.98075369 -0.02867285 1.37356971 -0.50619844 0.94476377 [61] -0.68163264 0.40382488 1.03326974 0.19850278 0.23389805 1.22135979 [67] 1.38664492 0.67771289 0.49501995 -0.88080609 -0.03501748 -0.85928749 [73] -0.72305174 -1.21350758 0.91227335 1.52956679 -0.39126508 -0.96765270 [79] 0.22061632 0.94640819 -0.89592927 1.05029796 -1.21013814 1.84613310 [85] -0.42679705 1.24204011 0.11797975 -0.82198696 1.17618393 0.30799441 [91] 1.05983566 -1.24214874 1.17242405 -0.25138313 0.50742331 -0.84240957 [97] -2.01243020 -2.84119755 1.92954388 -1.34484246 > rowMin(tmp2) [1] -3.10385359 -0.35283922 -1.85877861 -0.04529194 -0.63996183 -0.12451772 [7] 0.68777985 -0.66558497 -0.60777155 0.20424768 -0.51002194 1.49385406 [13] 0.56624538 1.17569584 1.25041614 -0.48574906 0.75820429 0.24178982 [19] -2.11672892 0.54063001 0.04138854 -0.86975727 0.52415766 -0.64179422 [25] 0.56325245 0.77153321 1.43538026 -1.00417949 0.03271116 0.03070315 [31] -0.45652820 -0.51540055 -1.01051949 -1.07838544 0.55420110 0.14525426 [37] -1.61397404 -0.09861646 -1.78259562 0.81848613 -1.33680863 0.35229071 [43] 0.88414320 0.27273291 -0.88517783 0.64975024 2.16128352 -1.92811422 [49] 1.44724047 0.94597283 1.28736844 1.28126711 0.44416846 0.89811852 [55] -0.64841936 -0.98075369 -0.02867285 1.37356971 -0.50619844 0.94476377 [61] -0.68163264 0.40382488 1.03326974 0.19850278 0.23389805 1.22135979 [67] 1.38664492 0.67771289 0.49501995 -0.88080609 -0.03501748 -0.85928749 [73] -0.72305174 -1.21350758 0.91227335 1.52956679 -0.39126508 -0.96765270 [79] 0.22061632 0.94640819 -0.89592927 1.05029796 -1.21013814 1.84613310 [85] -0.42679705 1.24204011 0.11797975 -0.82198696 1.17618393 0.30799441 [91] 1.05983566 -1.24214874 1.17242405 -0.25138313 0.50742331 -0.84240957 [97] -2.01243020 -2.84119755 1.92954388 -1.34484246 > > colMeans(tmp2) [1] 0.009090756 > colSums(tmp2) [1] 0.9090756 > colVars(tmp2) [1] 1.144747 > colSd(tmp2) [1] 1.069928 > colMax(tmp2) [1] 2.161284 > colMin(tmp2) [1] -3.103854 > colMedians(tmp2) [1] 0.131617 > colRanges(tmp2) [,1] [1,] -3.103854 [2,] 2.161284 > > 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] 0.35352558 2.30472764 -3.89566289 1.57224493 -5.41977832 -3.16345361 [7] -0.09008804 1.55682027 -6.97478028 7.57750835 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0618143 [2,] -0.6645264 [3,] 0.3100437 [4,] 0.6466596 [5,] 0.8986522 > > rowApply(tmp,sum) [1] 1.8167372 -0.3631579 1.5069840 -2.8529533 0.4602930 -3.5723440 [7] 3.4390992 -3.7425068 -2.6960898 -0.1749979 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 7 6 8 2 4 7 3 9 1 [2,] 5 10 4 9 4 7 3 6 4 9 [3,] 9 3 5 3 1 5 1 9 7 2 [4,] 8 9 10 4 3 2 6 8 3 7 [5,] 6 5 1 2 5 1 9 2 2 5 [6,] 3 1 3 10 9 8 10 1 5 3 [7,] 2 8 7 5 8 9 5 5 8 4 [8,] 4 6 8 6 10 6 2 10 1 8 [9,] 1 2 2 1 7 3 4 4 10 6 [10,] 10 4 9 7 6 10 8 7 6 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.2668428 2.0485370 -1.1690419 1.1532678 -5.4214739 -0.2682451 [7] -0.2455221 0.1150355 3.9756511 1.7036471 -0.4405408 1.6008519 [13] -3.4878423 3.0615943 -2.8533384 0.7806710 1.8792100 -0.4351011 [19] -2.5148257 -3.4925536 > colApply(tmp,quantile)[,1] [,1] [1,] -1.83125708 [2,] -0.01176326 [3,] 0.38757682 [4,] 0.48120177 [5,] 1.24108456 > > rowApply(tmp,sum) [1] 4.852587 5.093230 -2.513756 -1.801790 -9.373446 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 9 18 14 15 3 [2,] 11 20 9 11 16 [3,] 2 14 19 2 10 [4,] 8 11 20 17 9 [5,] 7 7 10 1 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.01176326 0.1412289 -0.7867839 -0.2047967 -0.3718475 1.1405551 [2,] 1.24108456 1.7693320 0.6233738 0.4212914 -0.1856830 0.4491741 [3,] 0.38757682 -0.2652773 0.7400136 0.8191875 -0.1177165 0.5553522 [4,] 0.48120177 0.1633742 -1.3513686 0.6153587 -1.3671269 -0.4165031 [5,] -1.83125708 0.2398792 -0.3942767 -0.4977731 -3.3791000 -1.9968233 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.51361231 0.35298765 2.4495567 1.0900309 -1.83152578 1.3874468 [2,] -0.85103026 0.05692261 0.9494524 -0.3632760 0.46140716 1.2570276 [3,] -0.08648023 0.68848851 -0.4911856 0.4123281 0.21663716 -1.9058518 [4,] 0.33517777 -0.84470686 1.6664625 0.4154896 -0.09977615 0.9637993 [5,] 0.87042295 -0.13865645 -0.5986348 0.1490745 0.81271682 -0.1015700 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.6296677 1.1155059 0.7889222 1.1163283 0.03780014 -0.7173849 [2,] -0.6757234 0.6716580 -1.1565379 1.2230363 -0.09433908 0.2392294 [3,] -1.0857366 0.7025230 -1.3776723 -0.5297040 0.13362209 -0.3850726 [4,] -1.0231160 0.8827597 0.1901070 -1.3034500 -0.75690098 0.5689546 [5,] -1.3329340 -0.3108524 -1.2981574 0.2744604 2.55902786 -0.1408275 [,19] [,20] [1,] -0.4814131 -0.4783162 [2,] -0.3817490 -0.5614211 [3,] -0.6041658 -0.3206223 [4,] -0.5110860 -0.4104411 [5,] -0.5364118 -1.7217530 > > > 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.17-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.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 626 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 542 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.5248108 -1.804183 0.7838345 0.0489631 -1.597679 1.561852 0.02918775 col8 col9 col10 col11 col12 col13 col14 row1 -0.4519261 2.000204 -0.4795773 -0.4827209 0.4447715 0.125148 0.209125 col15 col16 col17 col18 col19 col20 row1 0.702604 -1.604412 0.8160316 -1.441128 1.786404 0.8265253 > tmp[,"col10"] col10 row1 -0.4795773 row2 1.0846231 row3 -1.0140618 row4 0.9209830 row5 0.5184376 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.5248108 -1.8041825 0.7838345 0.0489631 -1.5976792 1.5618515 0.02918775 row5 0.3637038 -0.1177182 0.7992645 -0.3908466 0.2454845 -0.8384231 0.22708789 col8 col9 col10 col11 col12 col13 col14 row1 -0.4519261 2.0002044 -0.4795773 -0.4827209 0.4447715 0.125148 0.209125 row5 -0.6760514 0.6557638 0.5184376 -0.5194967 -0.6913661 1.427181 1.191334 col15 col16 col17 col18 col19 col20 row1 0.702604 -1.604412 0.8160316 -1.4411277 1.7864035 0.8265253 row5 1.864426 1.288684 1.1603039 0.5918822 0.2617054 0.7365261 > tmp[,c("col6","col20")] col6 col20 row1 1.5618515 0.8265253 row2 -0.6607824 -1.5106283 row3 -0.2621080 -0.3940125 row4 1.0317653 0.8337003 row5 -0.8384231 0.7365261 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.5618515 0.8265253 row5 -0.8384231 0.7365261 > > > > > 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.28073 49.29684 50.55985 49.24938 50.55719 104.7708 51.0289 50.35945 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.7613 48.74641 50.46585 49.54018 48.64875 48.51027 49.67671 49.45157 col17 col18 col19 col20 row1 50.33274 49.08393 51.13364 103.4975 > tmp[,"col10"] col10 row1 48.74641 row2 28.60095 row3 30.45167 row4 29.53914 row5 51.86720 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.28073 49.29684 50.55985 49.24938 50.55719 104.7708 51.02890 50.35945 row5 48.12682 48.53213 50.60670 49.98353 49.83699 106.5201 49.35128 51.35666 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.76130 48.74641 50.46585 49.54018 48.64875 48.51027 49.67671 49.45157 row5 50.21382 51.86720 49.58627 49.91152 51.75051 46.47539 49.33465 50.04163 col17 col18 col19 col20 row1 50.33274 49.08393 51.13364 103.4975 row5 49.91074 48.77838 49.90005 106.8713 > tmp[,c("col6","col20")] col6 col20 row1 104.77085 103.49749 row2 75.16411 75.05095 row3 76.85955 74.72392 row4 75.95819 75.57598 row5 106.52013 106.87126 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7708 103.4975 row5 106.5201 106.8713 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7708 103.4975 row5 106.5201 106.8713 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.5291710 [2,] -0.4772360 [3,] 1.8518806 [4,] -1.7336159 [5,] -0.6290488 > tmp[,c("col17","col7")] col17 col7 [1,] -1.6596412 0.2696629 [2,] 0.4192289 0.5686484 [3,] 0.5015230 2.2752761 [4,] 1.8483969 0.7371610 [5,] 1.0182955 -1.4601596 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -2.5254469 0.8173588 [2,] 0.2985860 1.1238288 [3,] -0.9118105 0.4523379 [4,] 1.0933031 -0.6938822 [5,] -0.2855578 0.2733942 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -2.525447 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -2.525447 [2,] 0.298586 > > > > 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.7334345 -0.2371230 0.2289513 -0.7255269 -0.5992071 0.8557676 -0.2710493 row1 0.6588856 0.2002081 0.1465486 -0.3368049 0.7902457 0.2792689 0.5480142 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.2191966 -0.4494733 -1.1700292 -0.4407252 -0.7033564 -0.06636854 row1 -0.1707114 -0.3617307 -0.7899342 -0.7889852 0.2783509 -1.47633637 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 2.009998 -0.3040165 2.2499257 -0.6926471 0.05435199 -2.301738 0.3100017 row1 2.060943 1.1457912 -0.8270291 0.5637743 -0.28995299 -1.341780 0.2191324 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.03254367 -0.09574008 0.6445228 1.563406 -0.9550142 0.4549303 -1.678718 [,8] [,9] [,10] row2 -1.618571 0.03555281 0.7235518 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.03582106 -0.368367 -0.3413875 -0.9104851 2.174523 1.184103 1.534599 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.5855074 0.3710277 -0.1248983 0.4609678 -0.2445019 -1.591054 2.026011 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.5598734 -1.708997 -1.362135 2.455902 1.179098 0.4136064 > > > 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: 0x000001e288b27190> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44481941a5a" [2] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444825c66038" [3] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444840f53bef" [4] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44484b1b563b" [5] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44482021110" [6] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444861123c8d" [7] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44486bcd3c65" [8] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444854039b6" [9] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444872707c62" [10] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44485edd2066" [11] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4448230d7ec9" [12] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM444854311f13" [13] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4448e4c7d70" [14] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM4448344912e4" [15] "F:/biocbuild/bbs-3.17-bioc/meat/BufferedMatrix.Rcheck/tests\\BM44487dd03844" > > > ### 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: 0x000001e28780f870> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001e28780f870> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.17-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001e28780f870> > rowMedians(tmp) [1] 0.4309385052 -0.5010015914 -0.3477657969 0.0526066278 -0.1617766549 [6] 0.1303563761 0.1891386934 0.2006003746 0.0033105669 0.4092706941 [11] 0.2627050804 0.0556267767 -0.3101965079 0.4085838575 -0.2469698370 [16] 0.2820554336 0.0940798361 0.1842008807 0.4846959465 0.1209595003 [21] 0.3586809291 -0.2071178964 -0.1992779979 0.4525748716 0.2542043324 [26] -0.1776683506 0.5751886691 -0.2381140859 0.2854800378 0.3171157344 [31] 0.2497130796 0.1721284535 -0.4386592730 -0.0331715718 -0.0408730102 [36] -0.1858060373 -0.5113939964 0.0531918750 -0.4328796837 0.0967789338 [41] -0.0801767427 0.1098729642 -0.2693571598 0.5945202022 0.4527656075 [46] 0.0968863851 -0.5110595751 0.1894255027 0.5111913374 -0.4948633278 [51] 0.0021847178 0.1450374897 -0.0514566463 -0.1182480499 -0.1610138825 [56] 0.6177697157 0.1223144227 0.1442279123 -0.0383844209 0.4179481997 [61] 0.1559184714 0.0631602473 -0.0288535414 -0.0711293385 -0.1111234991 [66] -0.0006212879 -0.4043388924 0.3713236030 0.5635193749 0.1977478946 [71] -0.5926028392 0.1129865884 0.1389868739 0.2478607035 0.3068745689 [76] -0.5747453921 -0.7750927237 -0.4591737780 -0.0416699926 0.3414814129 [81] -0.2268998322 -0.3907113501 0.2385190773 0.0330623901 -0.3453023678 [86] 0.2036023190 -0.1470595610 -0.0615520780 -0.2330234370 -0.0248043921 [91] 0.0710795142 -0.0358627527 0.3915010177 -0.2511016240 -0.4741082232 [96] -0.1909542666 0.3445524212 0.1880188803 0.0930491290 -0.3409167251 [101] -0.4697789597 -0.0240863768 -0.1222322346 -0.0028776307 -0.0865599079 [106] -0.1679191095 0.3633261387 0.0150689199 -0.0900261462 0.1359765035 [111] -0.3584499440 -0.6337695764 -0.0967237525 -0.0560083688 0.0133676579 [116] -0.4306031785 -0.1276226081 0.3623597686 -0.0223214713 0.3058644635 [121] 0.0705716084 -0.3108202995 0.2607541252 -0.1661031133 0.1422488719 [126] 0.4944275478 0.4047775680 -0.4598785414 -0.1156046588 -0.0228754666 [131] -0.0245179778 0.3183453313 -0.4614194890 0.4043849355 0.0685352370 [136] -0.3707851109 0.0955649855 -0.2154038108 0.3805045811 0.0317156971 [141] -0.1573602624 -0.3401998953 0.2527748843 0.1525102448 -0.4453134866 [146] -0.4112036817 0.8402546890 -0.5144877787 -0.1308734976 0.4270566268 [151] -0.5935821117 -0.5228937571 0.7706752201 0.1826525914 -0.0317633199 [156] -0.5656421014 -0.4038172218 0.1441973911 0.1527098746 0.0095337062 [161] -0.4057313840 0.2708980501 -0.0065815496 0.3570825065 -0.4305091358 [166] 0.1370228705 0.0578567039 -0.2624025536 -0.5045035761 -0.4139143574 [171] 0.3857952132 0.1226180264 -0.7840002053 0.2213970451 0.3950838166 [176] -0.2731072590 0.1524357721 -0.6400188818 0.2338153445 0.2017440020 [181] 0.1872135470 -0.2393103993 0.0181407883 0.3190831812 0.0375003758 [186] 0.2676224580 -0.2067329198 -0.0671960961 0.0538018364 -0.3097870610 [191] 0.3696210295 0.5395049578 0.5368711876 -0.3602869222 0.0624648403 [196] 0.5339012380 -0.2393374789 -0.5583718296 -0.2079006605 -0.3119548246 [201] 0.1895216769 0.0991741464 0.2479781586 0.0249356588 -0.2924858980 [206] 0.2594437538 0.2998299155 -0.0565191852 -0.0167434372 0.0543139646 [211] -0.0307179214 0.0539384911 0.0068205919 0.4192304686 0.4948145225 [216] 0.1900339351 -0.2403039484 0.0656903233 -0.0590219431 -0.2119607966 [221] 0.0817854711 0.2074781493 0.1646093256 -0.1609641458 0.5345702244 [226] -0.3631445991 0.5144155388 0.1468476750 -0.3751708347 0.1333172535 > > proc.time() user system elapsed 2.96 16.25 31.26
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 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: 0x00000280acf59500> > .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: 0x00000280acf59500> > .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: 0x00000280acf59500> > .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: 0x00000280acf59500> > 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: 0x00000280acf5a0d0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf5a0d0> > .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: 0x00000280acf5a0d0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf5a0d0> > .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: 0x00000280acf5a0d0> > 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: 0x00000280acf59810> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf59810> > .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: 0x00000280acf59810> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000280acf59810> > .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: 0x00000280acf59810> > > .Call("R_bm_RowMode",P) <pointer: 0x00000280acf59810> > .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: 0x00000280acf59810> > > .Call("R_bm_ColMode",P) <pointer: 0x00000280acf59810> > .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: 0x00000280acf59810> > 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: 0x00000280acf5a290> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x00000280acf5a290> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf5a290> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf5a290> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilead81102fbe" "BufferedMatrixFilead81d006d05" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilead81102fbe" "BufferedMatrixFilead81d006d05" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf59730> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf59730> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000280acf59730> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000280acf59730> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x00000280acf59730> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x00000280acf59730> > .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: 0x00000280acf59ce0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000280acf59ce0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000280acf59ce0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x00000280acf59ce0> > 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: 0x00000280acf59ab0> > .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: 0x00000280acf59ab0> > rm(P) > > proc.time() user system elapsed 0.26 0.17 0.45
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 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.25 0.09 0.42