Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-05-04 11:37:30 -0400 (Sat, 04 May 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" | 4753 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" | 4486 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.0 beta (2024-04-14 r86421) -- "Puppy Cup" | 4519 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" | 4479 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 249/2300 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.68.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / aarch64 | OK | OK | OK | ||||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.68.0 |
Command: F:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.19-bioc\R\library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz |
StartedAt: 2024-05-04 01:17:10 -0400 (Sat, 04 May 2024) |
EndedAt: 2024-05-04 01:18:42 -0400 (Sat, 04 May 2024) |
EllapsedTime: 91.8 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.19-bioc\R\library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck' * using R version 4.4.0 beta (2024-04-15 r86425 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.68.0' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'BufferedMatrix' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 13.2.0' * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files for x64 is not available File 'F:/biocbuild/bbs-3.19-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found '_exit', possibly from '_exit' (C) Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf. The detected symbols are linked into the code but might come from libraries and not actually be called. See 'Writing portable packages' in the 'Writing R Extensions' manual. * checking sizes of PDF files under 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'Rcodetesting.R' Running 'c_code_level_tests.R' Running 'objectTesting.R' Running 'rawCalltesting.R' OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See 'F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### F:\biocbuild\bbs-3.19-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'F:/biocbuild/bbs-3.19-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 13.2.0' gcc -I"F:/biocbuild/bbs-3.19-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"F:/biocbuild/bbs-3.19-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"F:/biocbuild/bbs-3.19-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"F:/biocbuild/bbs-3.19-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.19-bioc/R/bin/x64 -lR installing to F:/biocbuild/bbs-3.19-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for 'rowMeans' in package 'BufferedMatrix' Creating a new generic function for 'rowSums' in package 'BufferedMatrix' Creating a new generic function for 'colMeans' in package 'BufferedMatrix' Creating a new generic function for 'colSums' in package 'BufferedMatrix' Creating a generic function for 'ncol' from package 'base' in package 'BufferedMatrix' Creating a generic function for 'nrow' from package 'base' in package 'BufferedMatrix' ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.0 beta (2024-04-15 r86425 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.20 0.78
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 beta (2024-04-15 r86425 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.19-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 468463 25.1 1021758 54.6 633414 33.9 Vcells 853869 6.6 8388608 64.0 2003140 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] "Sat May 4 01:17:43 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] "Sat May 4 01:17:44 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: 0x00000254122fd3b0> > > > > 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] "Sat May 4 01:18:03 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] "Sat May 4 01:18:09 2024" > > ColMode(tmp2) <pointer: 0x00000254122fd3b0> > > > > ### 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.3866428 0.3226289 -1.2534143 -0.1045686 [2,] 0.3370124 0.4539006 -0.9416086 -1.5922354 [3,] -0.9516990 0.8671715 0.5426823 1.7595980 [4,] 0.1407967 -0.5341710 0.4222778 1.3434267 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.3866428 0.3226289 1.2534143 0.1045686 [2,] 0.3370124 0.4539006 0.9416086 1.5922354 [3,] 0.9516990 0.8671715 0.5426823 1.7595980 [4,] 0.1407967 0.5341710 0.4222778 1.3434267 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9692850 0.5680043 1.1195599 0.3233707 [2,] 0.5805277 0.6737215 0.9703652 1.2618381 [3,] 0.9755506 0.9312204 0.7366697 1.3264984 [4,] 0.3752288 0.7308701 0.6498291 1.1590628 > > 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.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.07949 31.00267 37.44901 28.33828 [2,] 31.14229 32.19112 35.64526 39.21062 [3,] 35.70720 35.17938 32.90938 40.02458 [4,] 28.89309 32.84287 31.92057 37.93406 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x00000254122fd410> > exp(tmp5) <pointer: 0x00000254122fd410> > log(tmp5,2) <pointer: 0x00000254122fd410> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.3921 > Min(tmp5) [1] 55.52697 > mean(tmp5) [1] 73.25444 > Sum(tmp5) [1] 14650.89 > Var(tmp5) [1] 844.8916 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.05197 71.64838 71.12709 72.81619 70.39543 67.36832 74.92158 72.89224 [9] 72.58563 68.73759 > rowSums(tmp5) [1] 1801.039 1432.968 1422.542 1456.324 1407.909 1347.366 1498.432 1457.845 [9] 1451.713 1374.752 > rowVars(tmp5) [1] 7884.79719 81.95713 47.74118 42.80405 72.02221 49.22337 [7] 77.71969 62.14469 75.35485 80.59046 > rowSd(tmp5) [1] 88.796380 9.053018 6.909499 6.542480 8.486590 7.015937 8.815877 [8] 7.883190 8.680717 8.977219 > rowMax(tmp5) [1] 466.39211 91.08330 86.57735 82.96506 86.32681 76.70871 93.10330 [8] 84.44183 90.60514 88.67739 > rowMin(tmp5) [1] 58.46806 57.05171 56.60355 60.13717 56.63032 56.06599 57.25348 55.52697 [9] 58.92230 55.62707 > > colMeans(tmp5) [1] 108.31313 68.71934 71.99941 74.19102 68.00338 74.66821 74.62979 [8] 69.67490 66.92019 67.09632 71.22851 75.76554 70.24958 68.95391 [15] 72.14171 71.63646 77.49843 72.18016 70.40079 70.81807 > colSums(tmp5) [1] 1083.1313 687.1934 719.9941 741.9102 680.0338 746.6821 746.2979 [8] 696.7490 669.2019 670.9632 712.2851 757.6554 702.4958 689.5391 [15] 721.4171 716.3646 774.9843 721.8016 704.0079 708.1807 > colVars(tmp5) [1] 15849.76397 48.51083 51.52218 94.33478 79.03498 42.65606 [7] 58.68365 56.42276 37.89645 70.45041 53.50704 73.04333 [13] 45.80433 86.72288 122.11471 72.84007 73.61613 37.96726 [19] 29.06748 86.99080 > colSd(tmp5) [1] 125.895846 6.964972 7.177895 9.712609 8.890162 6.531161 [7] 7.660525 7.511508 6.156009 8.393474 7.314851 8.546539 [13] 6.767889 9.312512 11.050552 8.534639 8.579984 6.161758 [19] 5.391427 9.326886 > colMax(tmp5) [1] 466.39211 80.78002 80.10820 84.48874 82.96506 84.67482 88.67739 [8] 84.44940 75.12139 84.44183 81.50707 93.10330 81.73751 82.37163 [15] 84.42086 90.60514 91.08330 81.22908 80.19298 87.06284 > colMin(tmp5) [1] 60.13717 56.61543 56.82377 56.06599 58.07081 64.95725 60.81923 58.00636 [9] 55.52697 56.60355 56.63032 65.27016 57.05171 55.62707 56.46081 61.72994 [17] 65.98419 62.37823 63.92270 56.17934 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 90.05197 71.64838 71.12709 72.81619 70.39543 67.36832 74.92158 72.89224 [9] 72.58563 NA > rowSums(tmp5) [1] 1801.039 1432.968 1422.542 1456.324 1407.909 1347.366 1498.432 1457.845 [9] 1451.713 NA > rowVars(tmp5) [1] 7884.79719 81.95713 47.74118 42.80405 72.02221 49.22337 [7] 77.71969 62.14469 75.35485 73.12038 > rowSd(tmp5) [1] 88.796380 9.053018 6.909499 6.542480 8.486590 7.015937 8.815877 [8] 7.883190 8.680717 8.551046 > rowMax(tmp5) [1] 466.39211 91.08330 86.57735 82.96506 86.32681 76.70871 93.10330 [8] 84.44183 90.60514 NA > rowMin(tmp5) [1] 58.46806 57.05171 56.60355 60.13717 56.63032 56.06599 57.25348 55.52697 [9] 58.92230 NA > > colMeans(tmp5) [1] 108.31313 68.71934 71.99941 74.19102 68.00338 74.66821 74.62979 [8] 69.67490 66.92019 67.09632 71.22851 75.76554 70.24958 68.95391 [15] 72.14171 71.63646 NA 72.18016 70.40079 70.81807 > colSums(tmp5) [1] 1083.1313 687.1934 719.9941 741.9102 680.0338 746.6821 746.2979 [8] 696.7490 669.2019 670.9632 712.2851 757.6554 702.4958 689.5391 [15] 721.4171 716.3646 NA 721.8016 704.0079 708.1807 > colVars(tmp5) [1] 15849.76397 48.51083 51.52218 94.33478 79.03498 42.65606 [7] 58.68365 56.42276 37.89645 70.45041 53.50704 73.04333 [13] 45.80433 86.72288 122.11471 72.84007 NA 37.96726 [19] 29.06748 86.99080 > colSd(tmp5) [1] 125.895846 6.964972 7.177895 9.712609 8.890162 6.531161 [7] 7.660525 7.511508 6.156009 8.393474 7.314851 8.546539 [13] 6.767889 9.312512 11.050552 8.534639 NA 6.161758 [19] 5.391427 9.326886 > colMax(tmp5) [1] 466.39211 80.78002 80.10820 84.48874 82.96506 84.67482 88.67739 [8] 84.44940 75.12139 84.44183 81.50707 93.10330 81.73751 82.37163 [15] 84.42086 90.60514 NA 81.22908 80.19298 87.06284 > colMin(tmp5) [1] 60.13717 56.61543 56.82377 56.06599 58.07081 64.95725 60.81923 58.00636 [9] 55.52697 56.60355 56.63032 65.27016 57.05171 55.62707 56.46081 61.72994 [17] NA 62.37823 63.92270 56.17934 > > Max(tmp5,na.rm=TRUE) [1] 466.3921 > Min(tmp5,na.rm=TRUE) [1] 55.52697 > mean(tmp5,na.rm=TRUE) [1] 73.20531 > Sum(tmp5,na.rm=TRUE) [1] 14567.86 > Var(tmp5,na.rm=TRUE) [1] 848.6736 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.05197 71.64838 71.12709 72.81619 70.39543 67.36832 74.92158 72.89224 [9] 72.58563 67.98531 > rowSums(tmp5,na.rm=TRUE) [1] 1801.039 1432.968 1422.542 1456.324 1407.909 1347.366 1498.432 1457.845 [9] 1451.713 1291.721 > rowVars(tmp5,na.rm=TRUE) [1] 7884.79719 81.95713 47.74118 42.80405 72.02221 49.22337 [7] 77.71969 62.14469 75.35485 73.12038 > rowSd(tmp5,na.rm=TRUE) [1] 88.796380 9.053018 6.909499 6.542480 8.486590 7.015937 8.815877 [8] 7.883190 8.680717 8.551046 > rowMax(tmp5,na.rm=TRUE) [1] 466.39211 91.08330 86.57735 82.96506 86.32681 76.70871 93.10330 [8] 84.44183 90.60514 88.67739 > rowMin(tmp5,na.rm=TRUE) [1] 58.46806 57.05171 56.60355 60.13717 56.63032 56.06599 57.25348 55.52697 [9] 58.92230 55.62707 > > colMeans(tmp5,na.rm=TRUE) [1] 108.31313 68.71934 71.99941 74.19102 68.00338 74.66821 74.62979 [8] 69.67490 66.92019 67.09632 71.22851 75.76554 70.24958 68.95391 [15] 72.14171 71.63646 76.88371 72.18016 70.40079 70.81807 > colSums(tmp5,na.rm=TRUE) [1] 1083.1313 687.1934 719.9941 741.9102 680.0338 746.6821 746.2979 [8] 696.7490 669.2019 670.9632 712.2851 757.6554 702.4958 689.5391 [15] 721.4171 716.3646 691.9534 721.8016 704.0079 708.1807 > colVars(tmp5,na.rm=TRUE) [1] 15849.76397 48.51083 51.52218 94.33478 79.03498 42.65606 [7] 58.68365 56.42276 37.89645 70.45041 53.50704 73.04333 [13] 45.80433 86.72288 122.11471 72.84007 78.56697 37.96726 [19] 29.06748 86.99080 > colSd(tmp5,na.rm=TRUE) [1] 125.895846 6.964972 7.177895 9.712609 8.890162 6.531161 [7] 7.660525 7.511508 6.156009 8.393474 7.314851 8.546539 [13] 6.767889 9.312512 11.050552 8.534639 8.863801 6.161758 [19] 5.391427 9.326886 > colMax(tmp5,na.rm=TRUE) [1] 466.39211 80.78002 80.10820 84.48874 82.96506 84.67482 88.67739 [8] 84.44940 75.12139 84.44183 81.50707 93.10330 81.73751 82.37163 [15] 84.42086 90.60514 91.08330 81.22908 80.19298 87.06284 > colMin(tmp5,na.rm=TRUE) [1] 60.13717 56.61543 56.82377 56.06599 58.07081 64.95725 60.81923 58.00636 [9] 55.52697 56.60355 56.63032 65.27016 57.05171 55.62707 56.46081 61.72994 [17] 65.98419 62.37823 63.92270 56.17934 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.05197 71.64838 71.12709 72.81619 70.39543 67.36832 74.92158 72.89224 [9] 72.58563 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1801.039 1432.968 1422.542 1456.324 1407.909 1347.366 1498.432 1457.845 [9] 1451.713 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7884.79719 81.95713 47.74118 42.80405 72.02221 49.22337 [7] 77.71969 62.14469 75.35485 NA > rowSd(tmp5,na.rm=TRUE) [1] 88.796380 9.053018 6.909499 6.542480 8.486590 7.015937 8.815877 [8] 7.883190 8.680717 NA > rowMax(tmp5,na.rm=TRUE) [1] 466.39211 91.08330 86.57735 82.96506 86.32681 76.70871 93.10330 [8] 84.44183 90.60514 NA > rowMin(tmp5,na.rm=TRUE) [1] 58.46806 57.05171 56.60355 60.13717 56.63032 56.06599 57.25348 55.52697 [9] 58.92230 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.78040 70.06421 72.29225 74.17018 68.99311 75.08264 73.06894 [8] 69.94417 67.07960 67.73870 70.08645 75.99798 70.96157 70.43467 [15] 71.84999 72.08107 NaN 72.75877 70.41328 72.44460 > colSums(tmp5,na.rm=TRUE) [1] 1015.0236 630.5779 650.6303 667.5316 620.9380 675.7437 657.6205 [8] 629.4975 603.7164 609.6483 630.7781 683.9818 638.6541 633.9121 [15] 646.6499 648.7297 0.0000 654.8289 633.7195 652.0014 > colVars(tmp5,na.rm=TRUE) [1] 17606.47381 34.22682 56.99765 106.12174 77.89420 46.05591 [7] 38.61143 62.65989 42.34762 74.61445 45.52199 81.56592 [13] 45.82703 72.89590 136.42171 79.72112 NA 38.94684 [19] 32.69917 68.10180 > colSd(tmp5,na.rm=TRUE) [1] 132.689388 5.850369 7.549679 10.301541 8.825769 6.786450 [7] 6.213810 7.915800 6.507505 8.637965 6.746999 9.031385 [13] 6.769567 8.537910 11.679970 8.928669 NA 6.240740 [19] 5.718319 8.252381 > colMax(tmp5,na.rm=TRUE) [1] 466.39211 80.78002 80.10820 84.48874 82.96506 84.67482 84.01031 [8] 84.44940 75.12139 84.44183 79.77099 93.10330 81.73751 82.37163 [15] 84.42086 90.60514 -Inf 81.22908 80.19298 87.06284 > colMin(tmp5,na.rm=TRUE) [1] 60.13717 63.82605 56.82377 56.06599 58.07081 64.95725 60.81923 58.00636 [9] 55.52697 56.60355 56.63032 65.27016 57.05171 57.25348 56.46081 61.72994 [17] Inf 62.37823 63.92270 59.31062 > > > > > 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] 248.6857 254.0194 223.6248 239.6683 184.3317 230.2690 456.2258 185.8747 [9] 159.4195 214.5584 > apply(copymatrix,1,var,na.rm=TRUE) [1] 248.6857 254.0194 223.6248 239.6683 184.3317 230.2690 456.2258 185.8747 [9] 159.4195 214.5584 > > > > 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 0.000000e+00 -8.526513e-14 -1.136868e-13 2.842171e-14 [6] 2.842171e-14 -5.684342e-14 -2.842171e-14 -1.136868e-13 0.000000e+00 [11] -4.263256e-14 2.842171e-14 -1.989520e-13 -2.842171e-13 -8.526513e-14 [16] -5.684342e-14 0.000000e+00 1.136868e-13 -4.263256e-14 -5.684342e-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) + } 1 10 2 20 7 19 3 15 10 19 7 7 1 19 3 18 2 20 8 4 2 13 4 20 3 9 7 7 3 4 10 3 2 17 1 16 6 4 3 5 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.069931 > Min(tmp) [1] -2.215155 > mean(tmp) [1] -0.00246735 > Sum(tmp) [1] -0.246735 > Var(tmp) [1] 0.9141906 > > rowMeans(tmp) [1] -0.00246735 > rowSums(tmp) [1] -0.246735 > rowVars(tmp) [1] 0.9141906 > rowSd(tmp) [1] 0.9561331 > rowMax(tmp) [1] 2.069931 > rowMin(tmp) [1] -2.215155 > > colMeans(tmp) [1] 0.719625641 1.213930729 -1.071193301 1.204916569 -0.261050436 [6] -0.397643724 -1.189913273 -0.399449937 -0.148934840 -0.385016507 [11] -0.176923055 -1.135181885 -2.215154761 0.852684146 -1.663375505 [16] 1.528836800 1.034011625 1.524482890 -0.392973609 -0.047548303 [21] -0.347860814 0.510709512 -0.002397400 -0.658621344 0.286728620 [26] -0.196676277 -0.641801524 1.596034923 -0.369020997 0.107955863 [31] -0.104173228 0.101696810 -0.283743019 -1.021236034 0.003786366 [36] 0.333554537 -0.607569724 1.031695665 0.092158145 2.069930772 [41] -0.045576462 -1.783563022 -0.645770242 1.548194488 -0.535522520 [46] 1.252187871 -0.532944697 -1.982116085 -0.402671882 0.079940769 [51] 1.335891310 -0.542844258 0.099300476 0.529725057 0.184697290 [56] -0.502921126 0.994150958 -0.635487440 -1.081809037 -1.150536857 [61] -2.050771470 0.866907980 0.480666461 -0.538866061 -0.489146597 [66] -1.575565333 0.209122957 1.933157286 0.167803195 0.661841194 [71] 1.382059122 0.683316829 0.828869743 -1.289821609 1.885800872 [76] -1.634543136 0.630529489 1.013357982 -0.478828239 -0.272760071 [81] -0.242493356 0.355575422 -0.521891173 1.632359852 0.541252092 [86] 1.203300055 0.337898545 -0.638075333 -0.186016176 -0.763989819 [91] -0.506404816 -0.212720108 -0.343572209 -0.766362857 1.251239696 [96] -0.315148337 -1.235280545 -0.159066226 -0.483225039 1.715149997 > colSums(tmp) [1] 0.719625641 1.213930729 -1.071193301 1.204916569 -0.261050436 [6] -0.397643724 -1.189913273 -0.399449937 -0.148934840 -0.385016507 [11] -0.176923055 -1.135181885 -2.215154761 0.852684146 -1.663375505 [16] 1.528836800 1.034011625 1.524482890 -0.392973609 -0.047548303 [21] -0.347860814 0.510709512 -0.002397400 -0.658621344 0.286728620 [26] -0.196676277 -0.641801524 1.596034923 -0.369020997 0.107955863 [31] -0.104173228 0.101696810 -0.283743019 -1.021236034 0.003786366 [36] 0.333554537 -0.607569724 1.031695665 0.092158145 2.069930772 [41] -0.045576462 -1.783563022 -0.645770242 1.548194488 -0.535522520 [46] 1.252187871 -0.532944697 -1.982116085 -0.402671882 0.079940769 [51] 1.335891310 -0.542844258 0.099300476 0.529725057 0.184697290 [56] -0.502921126 0.994150958 -0.635487440 -1.081809037 -1.150536857 [61] -2.050771470 0.866907980 0.480666461 -0.538866061 -0.489146597 [66] -1.575565333 0.209122957 1.933157286 0.167803195 0.661841194 [71] 1.382059122 0.683316829 0.828869743 -1.289821609 1.885800872 [76] -1.634543136 0.630529489 1.013357982 -0.478828239 -0.272760071 [81] -0.242493356 0.355575422 -0.521891173 1.632359852 0.541252092 [86] 1.203300055 0.337898545 -0.638075333 -0.186016176 -0.763989819 [91] -0.506404816 -0.212720108 -0.343572209 -0.766362857 1.251239696 [96] -0.315148337 -1.235280545 -0.159066226 -0.483225039 1.715149997 > 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.719625641 1.213930729 -1.071193301 1.204916569 -0.261050436 [6] -0.397643724 -1.189913273 -0.399449937 -0.148934840 -0.385016507 [11] -0.176923055 -1.135181885 -2.215154761 0.852684146 -1.663375505 [16] 1.528836800 1.034011625 1.524482890 -0.392973609 -0.047548303 [21] -0.347860814 0.510709512 -0.002397400 -0.658621344 0.286728620 [26] -0.196676277 -0.641801524 1.596034923 -0.369020997 0.107955863 [31] -0.104173228 0.101696810 -0.283743019 -1.021236034 0.003786366 [36] 0.333554537 -0.607569724 1.031695665 0.092158145 2.069930772 [41] -0.045576462 -1.783563022 -0.645770242 1.548194488 -0.535522520 [46] 1.252187871 -0.532944697 -1.982116085 -0.402671882 0.079940769 [51] 1.335891310 -0.542844258 0.099300476 0.529725057 0.184697290 [56] -0.502921126 0.994150958 -0.635487440 -1.081809037 -1.150536857 [61] -2.050771470 0.866907980 0.480666461 -0.538866061 -0.489146597 [66] -1.575565333 0.209122957 1.933157286 0.167803195 0.661841194 [71] 1.382059122 0.683316829 0.828869743 -1.289821609 1.885800872 [76] -1.634543136 0.630529489 1.013357982 -0.478828239 -0.272760071 [81] -0.242493356 0.355575422 -0.521891173 1.632359852 0.541252092 [86] 1.203300055 0.337898545 -0.638075333 -0.186016176 -0.763989819 [91] -0.506404816 -0.212720108 -0.343572209 -0.766362857 1.251239696 [96] -0.315148337 -1.235280545 -0.159066226 -0.483225039 1.715149997 > colMin(tmp) [1] 0.719625641 1.213930729 -1.071193301 1.204916569 -0.261050436 [6] -0.397643724 -1.189913273 -0.399449937 -0.148934840 -0.385016507 [11] -0.176923055 -1.135181885 -2.215154761 0.852684146 -1.663375505 [16] 1.528836800 1.034011625 1.524482890 -0.392973609 -0.047548303 [21] -0.347860814 0.510709512 -0.002397400 -0.658621344 0.286728620 [26] -0.196676277 -0.641801524 1.596034923 -0.369020997 0.107955863 [31] -0.104173228 0.101696810 -0.283743019 -1.021236034 0.003786366 [36] 0.333554537 -0.607569724 1.031695665 0.092158145 2.069930772 [41] -0.045576462 -1.783563022 -0.645770242 1.548194488 -0.535522520 [46] 1.252187871 -0.532944697 -1.982116085 -0.402671882 0.079940769 [51] 1.335891310 -0.542844258 0.099300476 0.529725057 0.184697290 [56] -0.502921126 0.994150958 -0.635487440 -1.081809037 -1.150536857 [61] -2.050771470 0.866907980 0.480666461 -0.538866061 -0.489146597 [66] -1.575565333 0.209122957 1.933157286 0.167803195 0.661841194 [71] 1.382059122 0.683316829 0.828869743 -1.289821609 1.885800872 [76] -1.634543136 0.630529489 1.013357982 -0.478828239 -0.272760071 [81] -0.242493356 0.355575422 -0.521891173 1.632359852 0.541252092 [86] 1.203300055 0.337898545 -0.638075333 -0.186016176 -0.763989819 [91] -0.506404816 -0.212720108 -0.343572209 -0.766362857 1.251239696 [96] -0.315148337 -1.235280545 -0.159066226 -0.483225039 1.715149997 > colMedians(tmp) [1] 0.719625641 1.213930729 -1.071193301 1.204916569 -0.261050436 [6] -0.397643724 -1.189913273 -0.399449937 -0.148934840 -0.385016507 [11] -0.176923055 -1.135181885 -2.215154761 0.852684146 -1.663375505 [16] 1.528836800 1.034011625 1.524482890 -0.392973609 -0.047548303 [21] -0.347860814 0.510709512 -0.002397400 -0.658621344 0.286728620 [26] -0.196676277 -0.641801524 1.596034923 -0.369020997 0.107955863 [31] -0.104173228 0.101696810 -0.283743019 -1.021236034 0.003786366 [36] 0.333554537 -0.607569724 1.031695665 0.092158145 2.069930772 [41] -0.045576462 -1.783563022 -0.645770242 1.548194488 -0.535522520 [46] 1.252187871 -0.532944697 -1.982116085 -0.402671882 0.079940769 [51] 1.335891310 -0.542844258 0.099300476 0.529725057 0.184697290 [56] -0.502921126 0.994150958 -0.635487440 -1.081809037 -1.150536857 [61] -2.050771470 0.866907980 0.480666461 -0.538866061 -0.489146597 [66] -1.575565333 0.209122957 1.933157286 0.167803195 0.661841194 [71] 1.382059122 0.683316829 0.828869743 -1.289821609 1.885800872 [76] -1.634543136 0.630529489 1.013357982 -0.478828239 -0.272760071 [81] -0.242493356 0.355575422 -0.521891173 1.632359852 0.541252092 [86] 1.203300055 0.337898545 -0.638075333 -0.186016176 -0.763989819 [91] -0.506404816 -0.212720108 -0.343572209 -0.766362857 1.251239696 [96] -0.315148337 -1.235280545 -0.159066226 -0.483225039 1.715149997 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7196256 1.213931 -1.071193 1.204917 -0.2610504 -0.3976437 -1.189913 [2,] 0.7196256 1.213931 -1.071193 1.204917 -0.2610504 -0.3976437 -1.189913 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.3994499 -0.1489348 -0.3850165 -0.1769231 -1.135182 -2.215155 0.8526841 [2,] -0.3994499 -0.1489348 -0.3850165 -0.1769231 -1.135182 -2.215155 0.8526841 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.663376 1.528837 1.034012 1.524483 -0.3929736 -0.0475483 -0.3478608 [2,] -1.663376 1.528837 1.034012 1.524483 -0.3929736 -0.0475483 -0.3478608 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.5107095 -0.0023974 -0.6586213 0.2867286 -0.1966763 -0.6418015 1.596035 [2,] 0.5107095 -0.0023974 -0.6586213 0.2867286 -0.1966763 -0.6418015 1.596035 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.369021 0.1079559 -0.1041732 0.1016968 -0.283743 -1.021236 0.003786366 [2,] -0.369021 0.1079559 -0.1041732 0.1016968 -0.283743 -1.021236 0.003786366 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.3335545 -0.6075697 1.031696 0.09215814 2.069931 -0.04557646 -1.783563 [2,] 0.3335545 -0.6075697 1.031696 0.09215814 2.069931 -0.04557646 -1.783563 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.6457702 1.548194 -0.5355225 1.252188 -0.5329447 -1.982116 -0.4026719 [2,] -0.6457702 1.548194 -0.5355225 1.252188 -0.5329447 -1.982116 -0.4026719 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.07994077 1.335891 -0.5428443 0.09930048 0.5297251 0.1846973 -0.5029211 [2,] 0.07994077 1.335891 -0.5428443 0.09930048 0.5297251 0.1846973 -0.5029211 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.994151 -0.6354874 -1.081809 -1.150537 -2.050771 0.866908 0.4806665 [2,] 0.994151 -0.6354874 -1.081809 -1.150537 -2.050771 0.866908 0.4806665 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.5388661 -0.4891466 -1.575565 0.209123 1.933157 0.1678032 0.6618412 [2,] -0.5388661 -0.4891466 -1.575565 0.209123 1.933157 0.1678032 0.6618412 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.382059 0.6833168 0.8288697 -1.289822 1.885801 -1.634543 0.6305295 [2,] 1.382059 0.6833168 0.8288697 -1.289822 1.885801 -1.634543 0.6305295 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.013358 -0.4788282 -0.2727601 -0.2424934 0.3555754 -0.5218912 1.63236 [2,] 1.013358 -0.4788282 -0.2727601 -0.2424934 0.3555754 -0.5218912 1.63236 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.5412521 1.2033 0.3378985 -0.6380753 -0.1860162 -0.7639898 -0.5064048 [2,] 0.5412521 1.2033 0.3378985 -0.6380753 -0.1860162 -0.7639898 -0.5064048 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.2127201 -0.3435722 -0.7663629 1.25124 -0.3151483 -1.235281 -0.1590662 [2,] -0.2127201 -0.3435722 -0.7663629 1.25124 -0.3151483 -1.235281 -0.1590662 [,99] [,100] [1,] -0.483225 1.71515 [2,] -0.483225 1.71515 > > > Max(tmp2) [1] 3.035681 > Min(tmp2) [1] -2.800095 > mean(tmp2) [1] 0.07245322 > Sum(tmp2) [1] 7.245322 > Var(tmp2) [1] 1.285921 > > rowMeans(tmp2) [1] 0.68564344 -0.36085909 1.51166423 0.78329164 -0.60165194 0.92115733 [7] -1.37553483 2.35345797 0.26829367 -0.64381240 0.26916210 -2.06133359 [13] -0.57541817 -1.36326635 0.50058227 -1.46729136 1.18408117 1.88309201 [19] -0.75108619 -0.90917261 0.16018775 -0.22666467 -1.12728722 -0.78057583 [25] 0.83014365 -0.23513149 -0.93694634 1.25548878 -0.04719795 1.12436291 [31] 0.68826510 1.40959510 0.52990780 3.03568131 -1.22303306 -2.80009539 [37] 0.08868323 1.52735358 -0.43163654 0.09826795 0.24777817 -0.39856093 [43] 1.53492493 -1.09444324 -0.92724569 -0.54919897 -0.47995375 2.23272057 [49] 0.08428868 -0.81806073 1.37596515 -0.93502959 0.29602304 0.72219741 [55] 0.46159160 1.53687380 -0.84252807 0.69960372 -2.16965557 -0.87742915 [61] -1.28097855 0.20953558 0.46955235 -2.55620633 0.13753914 0.31199043 [67] -0.38150944 -1.08184100 0.83555219 -0.35173692 -0.71553713 0.11593661 [73] 1.82119183 0.73875847 -0.68570378 0.02697403 -1.52524303 1.89667380 [79] -0.85540912 0.83941440 1.41295778 0.58613243 -0.28690883 0.60948984 [85] -0.01796637 -0.54970050 0.15899146 -1.09273878 1.39912060 0.78643604 [91] 1.45310548 0.58336490 0.96881069 -1.05614286 -1.14856701 1.12646173 [97] -1.45154752 0.60620181 -0.64258761 2.54122537 > rowSums(tmp2) [1] 0.68564344 -0.36085909 1.51166423 0.78329164 -0.60165194 0.92115733 [7] -1.37553483 2.35345797 0.26829367 -0.64381240 0.26916210 -2.06133359 [13] -0.57541817 -1.36326635 0.50058227 -1.46729136 1.18408117 1.88309201 [19] -0.75108619 -0.90917261 0.16018775 -0.22666467 -1.12728722 -0.78057583 [25] 0.83014365 -0.23513149 -0.93694634 1.25548878 -0.04719795 1.12436291 [31] 0.68826510 1.40959510 0.52990780 3.03568131 -1.22303306 -2.80009539 [37] 0.08868323 1.52735358 -0.43163654 0.09826795 0.24777817 -0.39856093 [43] 1.53492493 -1.09444324 -0.92724569 -0.54919897 -0.47995375 2.23272057 [49] 0.08428868 -0.81806073 1.37596515 -0.93502959 0.29602304 0.72219741 [55] 0.46159160 1.53687380 -0.84252807 0.69960372 -2.16965557 -0.87742915 [61] -1.28097855 0.20953558 0.46955235 -2.55620633 0.13753914 0.31199043 [67] -0.38150944 -1.08184100 0.83555219 -0.35173692 -0.71553713 0.11593661 [73] 1.82119183 0.73875847 -0.68570378 0.02697403 -1.52524303 1.89667380 [79] -0.85540912 0.83941440 1.41295778 0.58613243 -0.28690883 0.60948984 [85] -0.01796637 -0.54970050 0.15899146 -1.09273878 1.39912060 0.78643604 [91] 1.45310548 0.58336490 0.96881069 -1.05614286 -1.14856701 1.12646173 [97] -1.45154752 0.60620181 -0.64258761 2.54122537 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] 0.68564344 -0.36085909 1.51166423 0.78329164 -0.60165194 0.92115733 [7] -1.37553483 2.35345797 0.26829367 -0.64381240 0.26916210 -2.06133359 [13] -0.57541817 -1.36326635 0.50058227 -1.46729136 1.18408117 1.88309201 [19] -0.75108619 -0.90917261 0.16018775 -0.22666467 -1.12728722 -0.78057583 [25] 0.83014365 -0.23513149 -0.93694634 1.25548878 -0.04719795 1.12436291 [31] 0.68826510 1.40959510 0.52990780 3.03568131 -1.22303306 -2.80009539 [37] 0.08868323 1.52735358 -0.43163654 0.09826795 0.24777817 -0.39856093 [43] 1.53492493 -1.09444324 -0.92724569 -0.54919897 -0.47995375 2.23272057 [49] 0.08428868 -0.81806073 1.37596515 -0.93502959 0.29602304 0.72219741 [55] 0.46159160 1.53687380 -0.84252807 0.69960372 -2.16965557 -0.87742915 [61] -1.28097855 0.20953558 0.46955235 -2.55620633 0.13753914 0.31199043 [67] -0.38150944 -1.08184100 0.83555219 -0.35173692 -0.71553713 0.11593661 [73] 1.82119183 0.73875847 -0.68570378 0.02697403 -1.52524303 1.89667380 [79] -0.85540912 0.83941440 1.41295778 0.58613243 -0.28690883 0.60948984 [85] -0.01796637 -0.54970050 0.15899146 -1.09273878 1.39912060 0.78643604 [91] 1.45310548 0.58336490 0.96881069 -1.05614286 -1.14856701 1.12646173 [97] -1.45154752 0.60620181 -0.64258761 2.54122537 > rowMin(tmp2) [1] 0.68564344 -0.36085909 1.51166423 0.78329164 -0.60165194 0.92115733 [7] -1.37553483 2.35345797 0.26829367 -0.64381240 0.26916210 -2.06133359 [13] -0.57541817 -1.36326635 0.50058227 -1.46729136 1.18408117 1.88309201 [19] -0.75108619 -0.90917261 0.16018775 -0.22666467 -1.12728722 -0.78057583 [25] 0.83014365 -0.23513149 -0.93694634 1.25548878 -0.04719795 1.12436291 [31] 0.68826510 1.40959510 0.52990780 3.03568131 -1.22303306 -2.80009539 [37] 0.08868323 1.52735358 -0.43163654 0.09826795 0.24777817 -0.39856093 [43] 1.53492493 -1.09444324 -0.92724569 -0.54919897 -0.47995375 2.23272057 [49] 0.08428868 -0.81806073 1.37596515 -0.93502959 0.29602304 0.72219741 [55] 0.46159160 1.53687380 -0.84252807 0.69960372 -2.16965557 -0.87742915 [61] -1.28097855 0.20953558 0.46955235 -2.55620633 0.13753914 0.31199043 [67] -0.38150944 -1.08184100 0.83555219 -0.35173692 -0.71553713 0.11593661 [73] 1.82119183 0.73875847 -0.68570378 0.02697403 -1.52524303 1.89667380 [79] -0.85540912 0.83941440 1.41295778 0.58613243 -0.28690883 0.60948984 [85] -0.01796637 -0.54970050 0.15899146 -1.09273878 1.39912060 0.78643604 [91] 1.45310548 0.58336490 0.96881069 -1.05614286 -1.14856701 1.12646173 [97] -1.45154752 0.60620181 -0.64258761 2.54122537 > > colMeans(tmp2) [1] 0.07245322 > colSums(tmp2) [1] 7.245322 > colVars(tmp2) [1] 1.285921 > colSd(tmp2) [1] 1.133985 > colMax(tmp2) [1] 3.035681 > colMin(tmp2) [1] -2.800095 > colMedians(tmp2) [1] 0.1071023 > colRanges(tmp2) [,1] [1,] -2.800095 [2,] 3.035681 > > 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] -6.4245028 -0.9462800 -3.1064467 4.0009761 3.0025974 -4.6737291 [7] -2.5558056 -1.8116997 3.8384425 -0.1683924 > colApply(tmp,quantile)[,1] [,1] [1,] -2.24785650 [2,] -1.37964721 [3,] -0.56328721 [4,] 0.09687625 [5,] 1.04058223 > > rowApply(tmp,sum) [1] -3.3289591 3.2106615 -4.1360413 -0.2601700 -0.2007454 1.4122100 [7] 0.9450419 -2.9787577 3.8227910 -7.3308711 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 2 7 3 1 3 3 1 8 1 [2,] 5 5 8 1 9 2 1 5 5 10 [3,] 1 9 1 2 8 5 8 9 6 8 [4,] 4 7 10 9 7 4 9 6 10 7 [5,] 10 3 5 5 10 8 10 8 4 9 [6,] 9 1 9 8 2 1 7 2 1 5 [7,] 6 6 6 7 3 6 4 3 2 6 [8,] 2 4 2 6 4 10 2 7 7 2 [9,] 7 8 4 10 5 9 6 10 9 4 [10,] 3 10 3 4 6 7 5 4 3 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.45119116 -3.06638168 0.64543126 -0.29046099 -0.46594676 -2.36157745 [7] -2.53717766 -0.09109211 -1.92053650 -3.14727271 -1.72235599 3.08401424 [13] -1.65036374 -1.52448213 0.27133503 0.29508787 1.73843590 -0.09342664 [19] -0.50107469 1.83563635 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0214553 [2,] -0.4238874 [3,] 0.0580044 [4,] 1.6549760 [5,] 3.1835535 > > rowApply(tmp,sum) [1] -1.152628 3.435365 -5.419969 -1.129008 -3.784777 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 12 5 20 4 20 [2,] 2 11 16 5 3 [3,] 10 19 13 17 1 [4,] 11 15 1 13 16 [5,] 15 6 12 8 9 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.0580044 -1.3332182 -0.09984381 0.02306839 0.41042840 -0.3876723 [2,] -0.4238874 0.3274293 1.45729903 0.84855989 -0.04670725 0.2276149 [3,] 3.1835535 0.2523491 0.08705764 -1.94118217 -0.09345492 -1.5088768 [4,] -1.0214553 -0.9156405 0.90453845 0.28923969 -0.43910292 0.3690273 [5,] 1.6549760 -1.3973013 -1.70362004 0.48985321 -0.29711006 -1.0616707 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.6681313 0.4695355 0.42709607 -0.1777017 1.0650823 1.4377361 [2,] 0.7615652 0.8576042 -1.40719114 0.2499665 0.1760904 0.2461428 [3,] -0.9661403 -1.1454952 -0.67734704 -1.4915621 -0.4165705 0.1529736 [4,] -1.8786826 0.6566605 -0.04739672 -1.1029490 -1.4626967 1.1430056 [5,] 0.2142115 -0.9293972 -0.21569768 -0.6250265 -1.0842614 0.1041562 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.3501298 -0.2047868 0.3175055 -0.7241144 -1.6988461 0.2722204 [2,] -3.0992706 -0.4508075 0.9192049 1.7032848 0.4670159 -1.0191968 [3,] 0.1989844 -0.9170101 -0.7948604 0.5142698 0.6910460 0.5878675 [4,] 0.8362834 0.9649679 -0.8579489 0.2847048 2.1002145 -0.2922761 [5,] 0.7637689 -0.9168456 0.6874340 -1.4830571 0.1790057 0.3579585 [,19] [,20] [1,] -0.4355136 0.4466530 [2,] 1.1052764 0.5353716 [3,] -0.8135891 -0.3219816 [4,] -0.7671127 0.1076109 [5,] 0.4098643 1.0679824 > > > 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.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 622 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 543 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.7517026 0.8754706 -0.4866183 0.1757386 1.292171 0.2099958 -0.2344583 col8 col9 col10 col11 col12 col13 col14 row1 0.6158508 -0.4855516 0.8251786 0.9522758 -1.130112 0.2100366 1.63227 col15 col16 col17 col18 col19 col20 row1 -1.028087 -0.8198322 -0.5070827 -0.8015502 -0.8750125 0.15341 > tmp[,"col10"] col10 row1 0.82517862 row2 -0.47937999 row3 0.09692121 row4 -1.93658207 row5 0.50016416 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.7517026 0.8754706 -0.4866183 0.1757386 1.2921708 0.2099958 row5 -1.6770662 0.5626928 -0.7507023 -0.9555897 0.4269318 -1.5284524 col7 col8 col9 col10 col11 col12 col13 row1 -0.23445834 0.6158508 -0.4855516 0.8251786 0.9522758 -1.130112 0.2100366 row5 -0.09044489 1.6797149 -1.1454127 0.5001642 -0.9857777 -1.025390 0.3001306 col14 col15 col16 col17 col18 col19 col20 row1 1.632270 -1.028087 -0.8198322 -0.5070827 -0.8015502 -0.8750125 0.1534100 row5 0.723705 -0.283033 1.7729302 -0.7386827 1.4120508 -0.9937189 0.6410027 > tmp[,c("col6","col20")] col6 col20 row1 0.20999575 0.153409963 row2 -0.18588042 -0.474535448 row3 -0.09344081 -0.006535874 row4 0.30268061 1.441911031 row5 -1.52845238 0.641002736 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.2099958 0.1534100 row5 -1.5284524 0.6410027 > > > > > 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.50995 49.00248 51.12079 50.7922 49.7562 105.6151 50.49839 48.56784 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.27842 48.35327 49.16942 48.4068 51.30337 50.51653 49.91843 51.10238 col17 col18 col19 col20 row1 50.91431 50.17042 49.23017 104.9092 > tmp[,"col10"] col10 row1 48.35327 row2 29.97180 row3 30.31648 row4 29.75312 row5 50.37328 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.50995 49.00248 51.12079 50.79220 49.75620 105.6151 50.49839 48.56784 row5 50.52799 50.86339 49.41222 49.46443 50.92377 104.5482 50.29988 50.37244 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.27842 48.35327 49.16942 48.40680 51.30337 50.51653 49.91843 51.10238 row5 49.25148 50.37328 49.06871 49.58251 50.88907 50.29274 50.36823 50.28712 col17 col18 col19 col20 row1 50.91431 50.17042 49.23017 104.9092 row5 49.01405 50.37404 50.69512 105.2559 > tmp[,c("col6","col20")] col6 col20 row1 105.61509 104.90917 row2 74.44095 75.27007 row3 75.56389 74.37646 row4 76.10834 75.42720 row5 104.54818 105.25594 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.6151 104.9092 row5 104.5482 105.2559 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.6151 104.9092 row5 104.5482 105.2559 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.6742334 [2,] -1.4166057 [3,] -0.6409939 [4,] -0.2395388 [5,] -0.6391714 > tmp[,c("col17","col7")] col17 col7 [1,] 0.52597964 0.19615118 [2,] 1.02055185 0.05332441 [3,] 1.61909910 1.67244576 [4,] -0.25449485 1.89157096 [5,] -0.02905436 -0.54057437 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.03807105 0.5786678 [2,] -1.05398630 0.8284769 [3,] -1.09716326 0.8646771 [4,] 1.49760439 0.4847604 [5,] 1.22263026 -0.6861758 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.03807105 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.03807105 [2,] -1.05398630 > > > > 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.1851189 -0.6084977 0.1235397 -0.1262611 -1.3761241 -0.4957471 1.055759 row1 -0.4326921 0.9035352 0.0998328 -0.2078872 0.8581415 -0.6337524 0.400925 [,8] [,9] [,10] [,11] [,12] [,13] row3 1.2682848 1.8471437 0.3553449 -0.5174047 -0.8043694 1.1579090 row1 -0.2977463 -0.7708924 -1.1993453 -0.4032281 -0.1313210 0.2692938 [,14] [,15] [,16] [,17] [,18] [,19] row3 1.0119913 0.6384653 -0.4459908 0.7196608 -0.4394328 -2.2477061 row1 -0.6927785 -1.5507236 1.3814640 -2.2525270 0.8295410 0.4006577 [,20] row3 1.1716491 row1 0.2846633 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.2606786 -1.160233 -0.5025152 0.66332 -1.222813 0.8189688 -0.5378378 [,8] [,9] [,10] row2 -0.3485118 0.6856712 0.1399048 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.4597707 1.516574 -0.9791743 -1.33157 1.607715 0.6702671 1.877521 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 2.090489 -2.388891 1.427652 0.3909895 0.9464141 0.3807691 -1.431884 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.450818 -0.5276301 -0.4552728 -0.9772481 -0.1724992 -0.3157691 > > > 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: 0x00000254122fdd70> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236828bc219a" [2] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236821022636" [3] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM23688085b36" [4] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236850ec5674" [5] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236834932605" [6] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM2368666d7e69" [7] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM2368248c3acb" [8] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM23682546489d" [9] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236836f120e1" [10] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM23684a7c44d4" [11] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236827ff20da" [12] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM23684467fd8" [13] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236829ed4a65" [14] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236831052878" [15] "F:/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests\\BM236875d91175" > > > ### 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: 0x00000254149ffa10> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x00000254149ffa10> Warning message: In dir.create(new.directory) : 'F:\biocbuild\bbs-3.19-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x00000254149ffa10> > rowMedians(tmp) [1] 0.360358586 0.255074146 -0.217487357 0.624303124 0.186446498 [6] 0.029522015 0.600336583 -0.436520890 -0.172785141 0.073596550 [11] 0.405368260 0.124259817 0.204252259 -0.196892058 -0.400845784 [16] -0.334110494 0.344026046 0.170926454 -0.494469164 0.437143319 [21] 0.049212931 -0.140604901 -0.370911483 -0.132336493 0.356667907 [26] 0.050670474 -0.202627410 0.074334059 0.405992290 0.259806336 [31] 0.021421540 -0.364391789 0.343097150 -0.049424925 -0.247570373 [36] 0.812779574 0.144242417 -0.674993864 0.269661833 -0.199174944 [41] 0.035565950 0.059227075 0.120016838 0.314463327 0.351562173 [46] 0.203932440 0.685250241 -0.104844173 0.247101686 -0.124407326 [51] 0.084939150 0.189826533 0.239249500 -0.004904704 -0.282397985 [56] 0.114562443 -0.368467852 0.145685341 0.121584692 0.050271684 [61] 0.183686177 0.518244068 0.497353790 0.378212038 -0.177977645 [66] -0.325452691 0.082946508 0.624518822 -0.067472556 0.102708440 [71] 0.512273165 -0.254635372 -0.338709525 -0.078829161 0.353876143 [76] 0.289153144 -0.280780132 0.066777538 0.969704258 -0.302493395 [81] 0.136525471 0.677720240 -0.286169753 -0.017292621 0.505932750 [86] -0.172529240 -0.524399932 0.542846441 -0.319333949 0.034177634 [91] -0.232675064 -0.310166355 0.800935900 0.353799578 0.032611621 [96] -0.063810733 -0.112154392 0.341323910 -0.468080465 -0.117446861 [101] 0.539348906 -0.079117434 -0.509699388 -0.105409292 0.139239346 [106] 0.070894450 0.320801263 0.195183284 0.098895913 -0.011232725 [111] -0.157704306 -0.170864855 0.050150523 0.341763685 0.101967072 [116] 0.241734006 0.195161338 -0.196664727 -0.254366401 0.214149773 [121] -0.475836470 0.229735696 -0.408610649 -0.170971459 -0.045749903 [126] -0.594091734 -0.170011022 0.027498104 0.198673469 -0.511622374 [131] -0.422972863 -0.321451929 0.427565297 0.306161822 0.321882994 [136] -0.218814164 0.024533706 -0.093983822 0.021655323 0.165139162 [141] -0.063859999 0.601392573 -0.230964182 0.135561902 0.415564918 [146] -0.058141178 -0.400378830 -0.058547628 -0.207070305 -0.376614732 [151] -0.187654929 0.222236462 0.087803637 0.427912638 0.066766806 [156] 0.214241158 -0.675511014 0.626362707 0.149442341 -0.252246145 [161] -0.032019074 -0.032630319 0.100031966 -0.223139750 0.423886023 [166] -0.003660397 -0.167205082 -0.437526047 0.145167755 0.442627922 [171] 0.265045672 0.382125119 -0.053368078 -0.343217644 0.070649015 [176] 0.170298183 -0.096730809 0.082405363 0.082317061 0.542375178 [181] -0.097522405 -0.605927929 0.152484839 -0.078604283 -0.014837146 [186] -0.226914727 0.094187254 -0.485547422 0.367813068 0.228257979 [191] -0.048593813 0.057468529 0.227622202 0.058405961 -0.096464214 [196] 0.141588810 -0.433025392 -0.046838681 0.187883219 -0.015030521 [201] -0.264355668 0.831762546 0.047465899 0.550860722 0.615221608 [206] 0.024753948 0.119733390 0.422253306 -0.357424110 0.018957678 [211] 0.045161252 0.355216302 0.285444073 0.288403527 -0.035853332 [216] 0.322491397 0.425848336 0.001080431 -0.156539824 0.612353512 [221] 0.215915733 0.434853836 -0.127571414 0.305531260 0.271667964 [226] 0.070418138 -0.157941387 0.029484177 -0.213008538 0.549696662 > > proc.time() user system elapsed 3.73 20.01 52.29
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 beta (2024-04-15 r86425 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: 0x000001a5790fd6b0> > .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: 0x000001a5790fd6b0> > .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: 0x000001a5790fd6b0> > .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: 0x000001a5790fd6b0> > 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: 0x000001a5790fda10> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fda10> > .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: 0x000001a5790fda10> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fda10> > .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: 0x000001a5790fda10> > 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: 0x000001a5790fd170> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd170> > .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: 0x000001a5790fd170> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001a5790fd170> > .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: 0x000001a5790fd170> > > .Call("R_bm_RowMode",P) <pointer: 0x000001a5790fd170> > .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: 0x000001a5790fd170> > > .Call("R_bm_ColMode",P) <pointer: 0x000001a5790fd170> > .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: 0x000001a5790fd170> > 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: 0x000001a5790fd710> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001a5790fd710> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd710> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd710> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile31ac6b732aea" "BufferedMatrixFile31ac7e953782" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile31ac6b732aea" "BufferedMatrixFile31ac7e953782" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd530> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd530> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001a5790fd530> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001a5790fd530> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001a5790fd530> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001a5790fd530> > .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: 0x000001a5790fd950> > .Call("R_bm_AddColumn",P) <pointer: 0x000001a5790fd950> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001a5790fd950> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001a5790fd950> > 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: 0x000001a5790fdad0> > .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: 0x000001a5790fdad0> > rm(P) > > proc.time() user system elapsed 0.39 0.14 0.61
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 beta (2024-04-15 r86425 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.28 0.12 0.39