Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-07-06 11:38 -0400 (Sat, 06 Jul 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4643 |
palomino6 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4414 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4442 |
kjohnson3 | macOS 13.6.5 Ventura | arm64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4391 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 3833 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 246/2243 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.69.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino6 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.69.0 |
Command: /home/biocbuild/bbs-3.20-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.20-bioc/R/site-library --timings BufferedMatrix_1.69.0.tar.gz |
StartedAt: 2024-07-05 21:03:21 -0400 (Fri, 05 Jul 2024) |
EndedAt: 2024-07-05 21:03:43 -0400 (Fri, 05 Jul 2024) |
EllapsedTime: 22.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.20-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.20-bioc/R/site-library --timings BufferedMatrix_1.69.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.1 (2024-06-14) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 * running under: Ubuntu 22.04.4 LTS * using session charset: UTF-8 * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.69.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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 loading without being on the library search path ... 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 is not available * 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 re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.20-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.20-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’ gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -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){ | ^~~~~~~~~~~~~~~~~~~ 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"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c init_package.c -o init_package.o gcc -shared -L/home/biocbuild/bbs-3.20-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.20-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.20-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** 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 ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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.263 0.043 0.294
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 471777 25.2 1026220 54.9 643428 34.4 Vcells 871900 6.7 8388608 64.0 2046605 15.7 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Jul 5 21:03:35 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Jul 5 21:03:35 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: 0x564df5128950> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Jul 5 21:03:36 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Jul 5 21:03:36 2024" > > ColMode(tmp2) <pointer: 0x564df5128950> > > > > ### 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,] 102.64405583 -0.5844390 0.2084780 0.77356935 [2,] -0.08012902 0.9178363 0.6530985 -0.96815591 [3,] 0.12133374 1.0220560 -1.3519685 0.07059628 [4,] 0.21513703 0.3321795 0.2096691 0.81638556 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 102.64405583 0.5844390 0.2084780 0.77356935 [2,] 0.08012902 0.9178363 0.6530985 0.96815591 [3,] 0.12133374 1.0220560 1.3519685 0.07059628 [4,] 0.21513703 0.3321795 0.2096691 0.81638556 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.1313403 0.7644861 0.4565939 0.8795279 [2,] 0.2830707 0.9580377 0.8081451 0.9839491 [3,] 0.3483299 1.0109678 1.1627418 0.2656996 [4,] 0.4638287 0.5763502 0.4578964 0.9035406 > > 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: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 228.95746 33.22930 29.77442 34.56885 [2,] 27.91084 35.49821 33.73455 35.80765 [3,] 28.60463 36.13173 37.97939 27.72759 [4,] 29.85342 31.09568 29.78863 34.85179 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x564df6b5b820> > exp(tmp5) <pointer: 0x564df6b5b820> > log(tmp5,2) <pointer: 0x564df6b5b820> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 476.545 > Min(tmp5) [1] 54.6707 > mean(tmp5) [1] 72.30149 > Sum(tmp5) [1] 14460.3 > Var(tmp5) [1] 893.1538 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.46154 69.40275 70.19681 68.62899 73.38705 71.99305 68.95876 69.38995 [9] 71.45282 69.14316 > rowSums(tmp5) [1] 1809.231 1388.055 1403.936 1372.580 1467.741 1439.861 1379.175 1387.799 [9] 1429.056 1382.863 > rowVars(tmp5) [1] 8326.85696 65.29029 75.29488 56.79076 92.89027 75.07934 [7] 63.40630 79.55397 49.86400 61.45132 > rowSd(tmp5) [1] 91.251613 8.080241 8.677262 7.535964 9.637960 8.664833 7.962807 [8] 8.919303 7.061445 7.839089 > rowMax(tmp5) [1] 476.54495 82.47493 89.36850 85.65494 88.81402 87.12635 82.81308 [8] 85.25808 83.11094 83.59475 > rowMin(tmp5) [1] 55.45349 55.41000 57.71135 57.07328 57.42720 57.28716 55.39477 54.67070 [9] 58.86001 55.41026 > > colMeans(tmp5) [1] 110.20492 69.95309 70.53985 70.18373 69.31847 69.12949 73.68916 [8] 73.63126 67.98439 66.97705 71.11572 69.44319 76.22253 73.21662 [15] 65.38637 67.09603 68.01805 72.11670 72.26611 69.53704 > colSums(tmp5) [1] 1102.0492 699.5309 705.3985 701.8373 693.1847 691.2949 736.8916 [8] 736.3126 679.8439 669.7705 711.1572 694.4319 762.2253 732.1662 [15] 653.8637 670.9603 680.1805 721.1670 722.6611 695.3704 > colVars(tmp5) [1] 16683.99674 50.08984 94.34627 59.37927 45.72346 53.35194 [7] 74.82794 69.78514 52.08190 77.56306 57.58602 47.14924 [13] 73.01765 107.42024 37.73979 103.90075 50.15211 57.03206 [19] 80.04934 44.38316 > colSd(tmp5) [1] 129.166547 7.077418 9.713201 7.705795 6.761912 7.304242 [7] 8.650314 8.353750 7.216779 8.806989 7.588545 6.866530 [13] 8.545037 10.364374 6.143272 10.193172 7.081815 7.551957 [19] 8.947030 6.662068 > colMax(tmp5) [1] 476.54495 81.67441 87.12635 78.58516 77.14645 83.11094 88.89630 [8] 81.94980 83.59475 79.51201 82.88999 78.46079 85.65494 89.36850 [15] 75.51606 84.35185 82.47493 85.44969 81.48518 80.62548 > colMin(tmp5) [1] 58.09275 57.07884 61.97155 55.39477 54.67070 55.41026 62.15629 55.45349 [9] 58.86523 57.07328 60.00025 58.86001 58.63455 58.07125 55.41000 57.28716 [17] 62.18655 60.51088 56.44143 60.63314 > > > ### 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.46154 69.40275 70.19681 68.62899 73.38705 NA 68.95876 69.38995 [9] 71.45282 69.14316 > rowSums(tmp5) [1] 1809.231 1388.055 1403.936 1372.580 1467.741 NA 1379.175 1387.799 [9] 1429.056 1382.863 > rowVars(tmp5) [1] 8326.85696 65.29029 75.29488 56.79076 92.89027 66.60345 [7] 63.40630 79.55397 49.86400 61.45132 > rowSd(tmp5) [1] 91.251613 8.080241 8.677262 7.535964 9.637960 8.161094 7.962807 [8] 8.919303 7.061445 7.839089 > rowMax(tmp5) [1] 476.54495 82.47493 89.36850 85.65494 88.81402 NA 82.81308 [8] 85.25808 83.11094 83.59475 > rowMin(tmp5) [1] 55.45349 55.41000 57.71135 57.07328 57.42720 NA 55.39477 54.67070 [9] 58.86001 55.41026 > > colMeans(tmp5) [1] 110.20492 69.95309 70.53985 70.18373 69.31847 69.12949 73.68916 [8] 73.63126 67.98439 66.97705 71.11572 69.44319 76.22253 73.21662 [15] 65.38637 NA 68.01805 72.11670 72.26611 69.53704 > colSums(tmp5) [1] 1102.0492 699.5309 705.3985 701.8373 693.1847 691.2949 736.8916 [8] 736.3126 679.8439 669.7705 711.1572 694.4319 762.2253 732.1662 [15] 653.8637 NA 680.1805 721.1670 722.6611 695.3704 > colVars(tmp5) [1] 16683.99674 50.08984 94.34627 59.37927 45.72346 53.35194 [7] 74.82794 69.78514 52.08190 77.56306 57.58602 47.14924 [13] 73.01765 107.42024 37.73979 NA 50.15211 57.03206 [19] 80.04934 44.38316 > colSd(tmp5) [1] 129.166547 7.077418 9.713201 7.705795 6.761912 7.304242 [7] 8.650314 8.353750 7.216779 8.806989 7.588545 6.866530 [13] 8.545037 10.364374 6.143272 NA 7.081815 7.551957 [19] 8.947030 6.662068 > colMax(tmp5) [1] 476.54495 81.67441 87.12635 78.58516 77.14645 83.11094 88.89630 [8] 81.94980 83.59475 79.51201 82.88999 78.46079 85.65494 89.36850 [15] 75.51606 NA 82.47493 85.44969 81.48518 80.62548 > colMin(tmp5) [1] 58.09275 57.07884 61.97155 55.39477 54.67070 55.41026 62.15629 55.45349 [9] 58.86523 57.07328 60.00025 58.86001 58.63455 58.07125 55.41000 NA [17] 62.18655 60.51088 56.44143 60.63314 > > Max(tmp5,na.rm=TRUE) [1] 476.545 > Min(tmp5,na.rm=TRUE) [1] 54.6707 > mean(tmp5,na.rm=TRUE) [1] 72.37694 > Sum(tmp5,na.rm=TRUE) [1] 14403.01 > Var(tmp5,na.rm=TRUE) [1] 896.5205 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.46154 69.40275 70.19681 68.62899 73.38705 72.76704 68.95876 69.38995 [9] 71.45282 69.14316 > rowSums(tmp5,na.rm=TRUE) [1] 1809.231 1388.055 1403.936 1372.580 1467.741 1382.574 1379.175 1387.799 [9] 1429.056 1382.863 > rowVars(tmp5,na.rm=TRUE) [1] 8326.85696 65.29029 75.29488 56.79076 92.89027 66.60345 [7] 63.40630 79.55397 49.86400 61.45132 > rowSd(tmp5,na.rm=TRUE) [1] 91.251613 8.080241 8.677262 7.535964 9.637960 8.161094 7.962807 [8] 8.919303 7.061445 7.839089 > rowMax(tmp5,na.rm=TRUE) [1] 476.54495 82.47493 89.36850 85.65494 88.81402 87.12635 82.81308 [8] 85.25808 83.11094 83.59475 > rowMin(tmp5,na.rm=TRUE) [1] 55.45349 55.41000 57.71135 57.07328 57.42720 61.48323 55.39477 54.67070 [9] 58.86001 55.41026 > > colMeans(tmp5,na.rm=TRUE) [1] 110.20492 69.95309 70.53985 70.18373 69.31847 69.12949 73.68916 [8] 73.63126 67.98439 66.97705 71.11572 69.44319 76.22253 73.21662 [15] 65.38637 68.18590 68.01805 72.11670 72.26611 69.53704 > colSums(tmp5,na.rm=TRUE) [1] 1102.0492 699.5309 705.3985 701.8373 693.1847 691.2949 736.8916 [8] 736.3126 679.8439 669.7705 711.1572 694.4319 762.2253 732.1662 [15] 653.8637 613.6731 680.1805 721.1670 722.6611 695.3704 > colVars(tmp5,na.rm=TRUE) [1] 16683.99674 50.08984 94.34627 59.37927 45.72346 53.35194 [7] 74.82794 69.78514 52.08190 77.56306 57.58602 47.14924 [13] 73.01765 107.42024 37.73979 103.52530 50.15211 57.03206 [19] 80.04934 44.38316 > colSd(tmp5,na.rm=TRUE) [1] 129.166547 7.077418 9.713201 7.705795 6.761912 7.304242 [7] 8.650314 8.353750 7.216779 8.806989 7.588545 6.866530 [13] 8.545037 10.364374 6.143272 10.174739 7.081815 7.551957 [19] 8.947030 6.662068 > colMax(tmp5,na.rm=TRUE) [1] 476.54495 81.67441 87.12635 78.58516 77.14645 83.11094 88.89630 [8] 81.94980 83.59475 79.51201 82.88999 78.46079 85.65494 89.36850 [15] 75.51606 84.35185 82.47493 85.44969 81.48518 80.62548 > colMin(tmp5,na.rm=TRUE) [1] 58.09275 57.07884 61.97155 55.39477 54.67070 55.41026 62.15629 55.45349 [9] 58.86523 57.07328 60.00025 58.86001 58.63455 58.07125 55.41000 57.55003 [17] 62.18655 60.51088 56.44143 60.63314 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.46154 69.40275 70.19681 68.62899 73.38705 NaN 68.95876 69.38995 [9] 71.45282 69.14316 > rowSums(tmp5,na.rm=TRUE) [1] 1809.231 1388.055 1403.936 1372.580 1467.741 0.000 1379.175 1387.799 [9] 1429.056 1382.863 > rowVars(tmp5,na.rm=TRUE) [1] 8326.85696 65.29029 75.29488 56.79076 92.89027 NA [7] 63.40630 79.55397 49.86400 61.45132 > rowSd(tmp5,na.rm=TRUE) [1] 91.251613 8.080241 8.677262 7.535964 9.637960 NA 7.962807 [8] 8.919303 7.061445 7.839089 > rowMax(tmp5,na.rm=TRUE) [1] 476.54495 82.47493 89.36850 85.65494 88.81402 NA 82.81308 [8] 85.25808 83.11094 83.59475 > rowMin(tmp5,na.rm=TRUE) [1] 55.45349 55.41000 57.71135 57.07328 57.42720 NA 55.39477 54.67070 [9] 58.86001 55.41026 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.61844 68.65072 68.69691 69.25024 68.95391 69.35853 74.97059 [8] 72.91700 67.84022 67.42853 69.80747 70.27454 76.37803 72.47821 [15] 64.26084 NaN 68.39283 72.70627 72.24103 68.30499 > colSums(tmp5,na.rm=TRUE) [1] 1040.5660 617.8565 618.2722 623.2521 620.5852 624.2267 674.7353 [8] 656.2530 610.5619 606.8568 628.2672 632.4709 687.4023 652.3039 [15] 578.3476 0.0000 615.5354 654.3564 650.1693 614.7449 > colVars(tmp5,na.rm=TRUE) [1] 18439.80142 37.26919 67.92959 56.99834 49.94372 59.43077 [7] 65.70822 72.76877 58.35830 84.96534 45.52964 45.26743 [13] 81.87284 114.71383 28.20578 NA 54.84100 60.25069 [19] 90.04843 32.85416 > colSd(tmp5,na.rm=TRUE) [1] 135.793230 6.104850 8.241941 7.549725 7.067087 7.709136 [7] 8.106061 8.530461 7.639260 9.217665 6.747565 6.728108 [13] 9.048361 10.710454 5.310911 NA 7.405471 7.762132 [19] 9.489385 5.731855 > colMax(tmp5,na.rm=TRUE) [1] 476.54495 75.32804 85.49427 75.61867 77.14645 83.11094 88.89630 [8] 81.94980 83.59475 79.51201 80.14704 78.46079 85.65494 89.36850 [15] 71.18892 -Inf 82.47493 85.44969 81.48518 76.50422 > colMin(tmp5,na.rm=TRUE) [1] 58.09275 57.07884 61.97155 55.39477 54.67070 55.41026 65.60048 55.45349 [9] 58.86523 57.07328 60.00025 58.86001 58.63455 58.07125 55.41000 Inf [17] 62.18655 60.51088 56.44143 60.63314 > > > > > 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] 142.7745 244.7404 299.4714 207.4816 233.5436 199.3892 178.0565 348.8995 [9] 224.9490 141.7573 > apply(copymatrix,1,var,na.rm=TRUE) [1] 142.7745 244.7404 299.4714 207.4816 233.5436 199.3892 178.0565 348.8995 [9] 224.9490 141.7573 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 5.684342e-14 0.000000e+00 -1.278977e-13 2.842171e-14 -1.421085e-13 [6] 0.000000e+00 -1.705303e-13 5.684342e-14 -3.410605e-13 1.136868e-13 [11] -8.526513e-14 -5.684342e-14 1.136868e-13 -2.273737e-13 2.842171e-14 [16] 1.705303e-13 5.684342e-14 0.000000e+00 1.136868e-13 -2.273737e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 7 11 1 16 8 6 1 16 8 4 8 5 10 12 7 2 7 11 7 20 3 2 10 8 8 17 5 10 1 2 2 11 2 1 2 8 4 10 2 12 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.213543 > Min(tmp) [1] -2.123147 > mean(tmp) [1] 0.01629298 > Sum(tmp) [1] 1.629298 > Var(tmp) [1] 0.9916563 > > rowMeans(tmp) [1] 0.01629298 > rowSums(tmp) [1] 1.629298 > rowVars(tmp) [1] 0.9916563 > rowSd(tmp) [1] 0.9958194 > rowMax(tmp) [1] 2.213543 > rowMin(tmp) [1] -2.123147 > > colMeans(tmp) [1] 1.105629880 -1.552031339 0.579684098 -1.021095710 -0.376456210 [6] 0.569088331 -0.394059500 1.206141804 1.579971145 -0.378823473 [11] 0.920841414 0.588231607 -0.692886626 -0.306856507 1.947303067 [16] 0.100773820 0.021907955 -0.349622207 -0.768406998 -0.733967142 [21] -0.056693579 -1.038523117 0.301701529 -0.218233903 0.179085723 [26] 1.448201305 2.213542899 0.322960440 -0.515550482 0.019097427 [31] 0.093579392 1.116292290 2.047870158 1.721983971 -1.052978501 [36] -1.978067018 0.694237585 -0.748598945 -0.158840278 1.211337302 [41] -0.043613820 -1.541527371 -0.861611302 0.603564411 0.927622021 [46] 1.622454179 0.879476411 0.894902851 0.508444860 1.167108127 [51] -0.436428079 -0.214322555 -1.478326998 -2.123146972 1.233692626 [56] -0.606838051 -0.286706947 0.407903838 -0.169089023 0.734244013 [61] -0.871430916 0.091951177 -0.247719561 1.195254161 -0.624087889 [66] -0.770145339 -0.357864528 -0.553030791 -1.423046887 0.085456970 [71] 1.564962815 -0.736474654 -0.832188891 -1.774808165 1.426245864 [76] -1.488010993 -0.795740705 -1.023348853 0.540833620 -0.297473220 [81] 0.204209290 -0.041429815 -1.402906508 0.052087099 -1.808305015 [86] -1.569200737 0.988416238 0.200812796 -0.918444223 0.451612023 [91] -1.183933943 -0.224160307 -0.618231049 0.007540335 0.273579681 [96] 1.136425327 0.889090410 1.486740510 0.196977949 1.533511397 > colSums(tmp) [1] 1.105629880 -1.552031339 0.579684098 -1.021095710 -0.376456210 [6] 0.569088331 -0.394059500 1.206141804 1.579971145 -0.378823473 [11] 0.920841414 0.588231607 -0.692886626 -0.306856507 1.947303067 [16] 0.100773820 0.021907955 -0.349622207 -0.768406998 -0.733967142 [21] -0.056693579 -1.038523117 0.301701529 -0.218233903 0.179085723 [26] 1.448201305 2.213542899 0.322960440 -0.515550482 0.019097427 [31] 0.093579392 1.116292290 2.047870158 1.721983971 -1.052978501 [36] -1.978067018 0.694237585 -0.748598945 -0.158840278 1.211337302 [41] -0.043613820 -1.541527371 -0.861611302 0.603564411 0.927622021 [46] 1.622454179 0.879476411 0.894902851 0.508444860 1.167108127 [51] -0.436428079 -0.214322555 -1.478326998 -2.123146972 1.233692626 [56] -0.606838051 -0.286706947 0.407903838 -0.169089023 0.734244013 [61] -0.871430916 0.091951177 -0.247719561 1.195254161 -0.624087889 [66] -0.770145339 -0.357864528 -0.553030791 -1.423046887 0.085456970 [71] 1.564962815 -0.736474654 -0.832188891 -1.774808165 1.426245864 [76] -1.488010993 -0.795740705 -1.023348853 0.540833620 -0.297473220 [81] 0.204209290 -0.041429815 -1.402906508 0.052087099 -1.808305015 [86] -1.569200737 0.988416238 0.200812796 -0.918444223 0.451612023 [91] -1.183933943 -0.224160307 -0.618231049 0.007540335 0.273579681 [96] 1.136425327 0.889090410 1.486740510 0.196977949 1.533511397 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.105629880 -1.552031339 0.579684098 -1.021095710 -0.376456210 [6] 0.569088331 -0.394059500 1.206141804 1.579971145 -0.378823473 [11] 0.920841414 0.588231607 -0.692886626 -0.306856507 1.947303067 [16] 0.100773820 0.021907955 -0.349622207 -0.768406998 -0.733967142 [21] -0.056693579 -1.038523117 0.301701529 -0.218233903 0.179085723 [26] 1.448201305 2.213542899 0.322960440 -0.515550482 0.019097427 [31] 0.093579392 1.116292290 2.047870158 1.721983971 -1.052978501 [36] -1.978067018 0.694237585 -0.748598945 -0.158840278 1.211337302 [41] -0.043613820 -1.541527371 -0.861611302 0.603564411 0.927622021 [46] 1.622454179 0.879476411 0.894902851 0.508444860 1.167108127 [51] -0.436428079 -0.214322555 -1.478326998 -2.123146972 1.233692626 [56] -0.606838051 -0.286706947 0.407903838 -0.169089023 0.734244013 [61] -0.871430916 0.091951177 -0.247719561 1.195254161 -0.624087889 [66] -0.770145339 -0.357864528 -0.553030791 -1.423046887 0.085456970 [71] 1.564962815 -0.736474654 -0.832188891 -1.774808165 1.426245864 [76] -1.488010993 -0.795740705 -1.023348853 0.540833620 -0.297473220 [81] 0.204209290 -0.041429815 -1.402906508 0.052087099 -1.808305015 [86] -1.569200737 0.988416238 0.200812796 -0.918444223 0.451612023 [91] -1.183933943 -0.224160307 -0.618231049 0.007540335 0.273579681 [96] 1.136425327 0.889090410 1.486740510 0.196977949 1.533511397 > colMin(tmp) [1] 1.105629880 -1.552031339 0.579684098 -1.021095710 -0.376456210 [6] 0.569088331 -0.394059500 1.206141804 1.579971145 -0.378823473 [11] 0.920841414 0.588231607 -0.692886626 -0.306856507 1.947303067 [16] 0.100773820 0.021907955 -0.349622207 -0.768406998 -0.733967142 [21] -0.056693579 -1.038523117 0.301701529 -0.218233903 0.179085723 [26] 1.448201305 2.213542899 0.322960440 -0.515550482 0.019097427 [31] 0.093579392 1.116292290 2.047870158 1.721983971 -1.052978501 [36] -1.978067018 0.694237585 -0.748598945 -0.158840278 1.211337302 [41] -0.043613820 -1.541527371 -0.861611302 0.603564411 0.927622021 [46] 1.622454179 0.879476411 0.894902851 0.508444860 1.167108127 [51] -0.436428079 -0.214322555 -1.478326998 -2.123146972 1.233692626 [56] -0.606838051 -0.286706947 0.407903838 -0.169089023 0.734244013 [61] -0.871430916 0.091951177 -0.247719561 1.195254161 -0.624087889 [66] -0.770145339 -0.357864528 -0.553030791 -1.423046887 0.085456970 [71] 1.564962815 -0.736474654 -0.832188891 -1.774808165 1.426245864 [76] -1.488010993 -0.795740705 -1.023348853 0.540833620 -0.297473220 [81] 0.204209290 -0.041429815 -1.402906508 0.052087099 -1.808305015 [86] -1.569200737 0.988416238 0.200812796 -0.918444223 0.451612023 [91] -1.183933943 -0.224160307 -0.618231049 0.007540335 0.273579681 [96] 1.136425327 0.889090410 1.486740510 0.196977949 1.533511397 > colMedians(tmp) [1] 1.105629880 -1.552031339 0.579684098 -1.021095710 -0.376456210 [6] 0.569088331 -0.394059500 1.206141804 1.579971145 -0.378823473 [11] 0.920841414 0.588231607 -0.692886626 -0.306856507 1.947303067 [16] 0.100773820 0.021907955 -0.349622207 -0.768406998 -0.733967142 [21] -0.056693579 -1.038523117 0.301701529 -0.218233903 0.179085723 [26] 1.448201305 2.213542899 0.322960440 -0.515550482 0.019097427 [31] 0.093579392 1.116292290 2.047870158 1.721983971 -1.052978501 [36] -1.978067018 0.694237585 -0.748598945 -0.158840278 1.211337302 [41] -0.043613820 -1.541527371 -0.861611302 0.603564411 0.927622021 [46] 1.622454179 0.879476411 0.894902851 0.508444860 1.167108127 [51] -0.436428079 -0.214322555 -1.478326998 -2.123146972 1.233692626 [56] -0.606838051 -0.286706947 0.407903838 -0.169089023 0.734244013 [61] -0.871430916 0.091951177 -0.247719561 1.195254161 -0.624087889 [66] -0.770145339 -0.357864528 -0.553030791 -1.423046887 0.085456970 [71] 1.564962815 -0.736474654 -0.832188891 -1.774808165 1.426245864 [76] -1.488010993 -0.795740705 -1.023348853 0.540833620 -0.297473220 [81] 0.204209290 -0.041429815 -1.402906508 0.052087099 -1.808305015 [86] -1.569200737 0.988416238 0.200812796 -0.918444223 0.451612023 [91] -1.183933943 -0.224160307 -0.618231049 0.007540335 0.273579681 [96] 1.136425327 0.889090410 1.486740510 0.196977949 1.533511397 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.10563 -1.552031 0.5796841 -1.021096 -0.3764562 0.5690883 -0.3940595 [2,] 1.10563 -1.552031 0.5796841 -1.021096 -0.3764562 0.5690883 -0.3940595 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.206142 1.579971 -0.3788235 0.9208414 0.5882316 -0.6928866 -0.3068565 [2,] 1.206142 1.579971 -0.3788235 0.9208414 0.5882316 -0.6928866 -0.3068565 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.947303 0.1007738 0.02190795 -0.3496222 -0.768407 -0.7339671 -0.05669358 [2,] 1.947303 0.1007738 0.02190795 -0.3496222 -0.768407 -0.7339671 -0.05669358 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.038523 0.3017015 -0.2182339 0.1790857 1.448201 2.213543 0.3229604 [2,] -1.038523 0.3017015 -0.2182339 0.1790857 1.448201 2.213543 0.3229604 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.5155505 0.01909743 0.09357939 1.116292 2.04787 1.721984 -1.052979 [2,] -0.5155505 0.01909743 0.09357939 1.116292 2.04787 1.721984 -1.052979 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.978067 0.6942376 -0.7485989 -0.1588403 1.211337 -0.04361382 -1.541527 [2,] -1.978067 0.6942376 -0.7485989 -0.1588403 1.211337 -0.04361382 -1.541527 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.8616113 0.6035644 0.927622 1.622454 0.8794764 0.8949029 0.5084449 [2,] -0.8616113 0.6035644 0.927622 1.622454 0.8794764 0.8949029 0.5084449 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.167108 -0.4364281 -0.2143226 -1.478327 -2.123147 1.233693 -0.6068381 [2,] 1.167108 -0.4364281 -0.2143226 -1.478327 -2.123147 1.233693 -0.6068381 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.2867069 0.4079038 -0.169089 0.734244 -0.8714309 0.09195118 -0.2477196 [2,] -0.2867069 0.4079038 -0.169089 0.734244 -0.8714309 0.09195118 -0.2477196 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.195254 -0.6240879 -0.7701453 -0.3578645 -0.5530308 -1.423047 0.08545697 [2,] 1.195254 -0.6240879 -0.7701453 -0.3578645 -0.5530308 -1.423047 0.08545697 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.564963 -0.7364747 -0.8321889 -1.774808 1.426246 -1.488011 -0.7957407 [2,] 1.564963 -0.7364747 -0.8321889 -1.774808 1.426246 -1.488011 -0.7957407 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.023349 0.5408336 -0.2974732 0.2042093 -0.04142982 -1.402907 0.0520871 [2,] -1.023349 0.5408336 -0.2974732 0.2042093 -0.04142982 -1.402907 0.0520871 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.808305 -1.569201 0.9884162 0.2008128 -0.9184442 0.451612 -1.183934 [2,] -1.808305 -1.569201 0.9884162 0.2008128 -0.9184442 0.451612 -1.183934 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.2241603 -0.618231 0.007540335 0.2735797 1.136425 0.8890904 1.486741 [2,] -0.2241603 -0.618231 0.007540335 0.2735797 1.136425 0.8890904 1.486741 [,99] [,100] [1,] 0.1969779 1.533511 [2,] 0.1969779 1.533511 > > > Max(tmp2) [1] 2.118748 > Min(tmp2) [1] -2.829766 > mean(tmp2) [1] 0.06882433 > Sum(tmp2) [1] 6.882433 > Var(tmp2) [1] 0.8795561 > > rowMeans(tmp2) [1] -0.561805399 0.531808016 -0.470712235 -1.079452158 0.588748494 [6] 0.673452761 0.287882156 0.209939510 0.628974375 0.656475080 [11] 0.282926867 0.473458198 -0.952082902 -0.454338227 -0.726042107 [16] -0.237721952 0.546753543 1.125852453 0.122449292 -0.485023124 [21] 0.796926729 1.581930556 -2.293640321 -0.358971919 0.870196716 [26] -0.646145679 0.123974065 1.739380091 0.441188407 -0.631187637 [31] 0.853868687 -0.161241146 0.026493799 0.899791038 0.638767222 [36] -1.679840901 1.388315357 -0.708527866 0.623747358 0.929510724 [41] -1.177152816 -0.012501430 1.939285918 0.358353784 1.346601550 [46] -0.183371666 1.262729144 -1.015604308 2.118747588 -0.269107393 [51] 0.627273081 -0.003992954 -1.032620508 -0.260399943 1.298600814 [56] -1.104649987 0.463598486 1.490553738 0.372593132 0.615824465 [61] -1.395167901 -2.325072548 0.448872708 0.036935405 -0.065486603 [66] -0.632456090 0.746534649 0.479187340 -1.391288628 -0.142704773 [71] 1.262046075 0.182024481 -0.178878067 -0.194931635 0.823477114 [76] 0.475987583 -2.039083133 -2.829765865 -0.549619888 -0.870850024 [81] -0.766210166 0.531599641 -0.290985293 0.201954428 -0.724077351 [86] 1.394083304 1.260718337 0.653468446 0.910370228 0.515466164 [91] -1.011016958 -0.372776663 0.272335213 0.383466192 -0.695400908 [96] 0.605595871 -0.941885377 -0.027846225 0.399312264 0.313662668 > rowSums(tmp2) [1] -0.561805399 0.531808016 -0.470712235 -1.079452158 0.588748494 [6] 0.673452761 0.287882156 0.209939510 0.628974375 0.656475080 [11] 0.282926867 0.473458198 -0.952082902 -0.454338227 -0.726042107 [16] -0.237721952 0.546753543 1.125852453 0.122449292 -0.485023124 [21] 0.796926729 1.581930556 -2.293640321 -0.358971919 0.870196716 [26] -0.646145679 0.123974065 1.739380091 0.441188407 -0.631187637 [31] 0.853868687 -0.161241146 0.026493799 0.899791038 0.638767222 [36] -1.679840901 1.388315357 -0.708527866 0.623747358 0.929510724 [41] -1.177152816 -0.012501430 1.939285918 0.358353784 1.346601550 [46] -0.183371666 1.262729144 -1.015604308 2.118747588 -0.269107393 [51] 0.627273081 -0.003992954 -1.032620508 -0.260399943 1.298600814 [56] -1.104649987 0.463598486 1.490553738 0.372593132 0.615824465 [61] -1.395167901 -2.325072548 0.448872708 0.036935405 -0.065486603 [66] -0.632456090 0.746534649 0.479187340 -1.391288628 -0.142704773 [71] 1.262046075 0.182024481 -0.178878067 -0.194931635 0.823477114 [76] 0.475987583 -2.039083133 -2.829765865 -0.549619888 -0.870850024 [81] -0.766210166 0.531599641 -0.290985293 0.201954428 -0.724077351 [86] 1.394083304 1.260718337 0.653468446 0.910370228 0.515466164 [91] -1.011016958 -0.372776663 0.272335213 0.383466192 -0.695400908 [96] 0.605595871 -0.941885377 -0.027846225 0.399312264 0.313662668 > 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.561805399 0.531808016 -0.470712235 -1.079452158 0.588748494 [6] 0.673452761 0.287882156 0.209939510 0.628974375 0.656475080 [11] 0.282926867 0.473458198 -0.952082902 -0.454338227 -0.726042107 [16] -0.237721952 0.546753543 1.125852453 0.122449292 -0.485023124 [21] 0.796926729 1.581930556 -2.293640321 -0.358971919 0.870196716 [26] -0.646145679 0.123974065 1.739380091 0.441188407 -0.631187637 [31] 0.853868687 -0.161241146 0.026493799 0.899791038 0.638767222 [36] -1.679840901 1.388315357 -0.708527866 0.623747358 0.929510724 [41] -1.177152816 -0.012501430 1.939285918 0.358353784 1.346601550 [46] -0.183371666 1.262729144 -1.015604308 2.118747588 -0.269107393 [51] 0.627273081 -0.003992954 -1.032620508 -0.260399943 1.298600814 [56] -1.104649987 0.463598486 1.490553738 0.372593132 0.615824465 [61] -1.395167901 -2.325072548 0.448872708 0.036935405 -0.065486603 [66] -0.632456090 0.746534649 0.479187340 -1.391288628 -0.142704773 [71] 1.262046075 0.182024481 -0.178878067 -0.194931635 0.823477114 [76] 0.475987583 -2.039083133 -2.829765865 -0.549619888 -0.870850024 [81] -0.766210166 0.531599641 -0.290985293 0.201954428 -0.724077351 [86] 1.394083304 1.260718337 0.653468446 0.910370228 0.515466164 [91] -1.011016958 -0.372776663 0.272335213 0.383466192 -0.695400908 [96] 0.605595871 -0.941885377 -0.027846225 0.399312264 0.313662668 > rowMin(tmp2) [1] -0.561805399 0.531808016 -0.470712235 -1.079452158 0.588748494 [6] 0.673452761 0.287882156 0.209939510 0.628974375 0.656475080 [11] 0.282926867 0.473458198 -0.952082902 -0.454338227 -0.726042107 [16] -0.237721952 0.546753543 1.125852453 0.122449292 -0.485023124 [21] 0.796926729 1.581930556 -2.293640321 -0.358971919 0.870196716 [26] -0.646145679 0.123974065 1.739380091 0.441188407 -0.631187637 [31] 0.853868687 -0.161241146 0.026493799 0.899791038 0.638767222 [36] -1.679840901 1.388315357 -0.708527866 0.623747358 0.929510724 [41] -1.177152816 -0.012501430 1.939285918 0.358353784 1.346601550 [46] -0.183371666 1.262729144 -1.015604308 2.118747588 -0.269107393 [51] 0.627273081 -0.003992954 -1.032620508 -0.260399943 1.298600814 [56] -1.104649987 0.463598486 1.490553738 0.372593132 0.615824465 [61] -1.395167901 -2.325072548 0.448872708 0.036935405 -0.065486603 [66] -0.632456090 0.746534649 0.479187340 -1.391288628 -0.142704773 [71] 1.262046075 0.182024481 -0.178878067 -0.194931635 0.823477114 [76] 0.475987583 -2.039083133 -2.829765865 -0.549619888 -0.870850024 [81] -0.766210166 0.531599641 -0.290985293 0.201954428 -0.724077351 [86] 1.394083304 1.260718337 0.653468446 0.910370228 0.515466164 [91] -1.011016958 -0.372776663 0.272335213 0.383466192 -0.695400908 [96] 0.605595871 -0.941885377 -0.027846225 0.399312264 0.313662668 > > colMeans(tmp2) [1] 0.06882433 > colSums(tmp2) [1] 6.882433 > colVars(tmp2) [1] 0.8795561 > colSd(tmp2) [1] 0.9378465 > colMax(tmp2) [1] 2.118748 > colMin(tmp2) [1] -2.829766 > colMedians(tmp2) [1] 0.205947 > colRanges(tmp2) [,1] [1,] -2.829766 [2,] 2.118748 > > 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.2755208 -2.0797041 4.3308173 -0.4137001 -0.4193421 -3.9210007 [7] 0.2661202 1.5082100 -2.9300358 -1.2314125 > colApply(tmp,quantile)[,1] [,1] [1,] -1.7975000 [2,] -0.8977852 [3,] 0.3862271 [4,] 0.7888162 [5,] 1.8209865 > > rowApply(tmp,sum) [1] -1.1805089 4.1655636 -1.4973978 -1.2159293 -0.3299302 2.4481535 [7] 0.3461035 -2.3670717 -1.9028411 -3.0806685 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 3 10 1 1 9 7 7 8 2 [2,] 1 10 1 7 8 2 3 4 5 10 [3,] 8 5 6 10 4 10 6 9 4 4 [4,] 6 9 7 9 10 4 4 2 6 1 [5,] 7 4 3 5 3 8 9 5 3 9 [6,] 2 1 4 4 2 6 10 3 9 3 [7,] 3 6 2 8 6 7 5 8 7 8 [8,] 10 8 5 2 7 5 8 1 10 5 [9,] 9 7 9 3 5 1 1 10 1 6 [10,] 5 2 8 6 9 3 2 6 2 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.3613661 2.8080151 -3.4547104 0.7720235 -0.4323485 0.5237051 [7] -1.2584460 0.8554456 1.3714633 2.1785908 1.0089922 -1.0999728 [13] 0.1071572 0.8872205 2.1158542 -0.5567908 0.7751650 1.0718256 [19] -2.9125936 1.8253546 > colApply(tmp,quantile)[,1] [,1] [1,] -2.0787511 [2,] -0.3668628 [3,] 0.2025964 [4,] 0.4179604 [5,] 1.4636910 > > rowApply(tmp,sum) [1] 0.2155353 2.5911129 1.3591969 2.6507709 -0.5920315 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 8 11 20 14 1 [2,] 20 16 17 5 9 [3,] 9 6 7 3 3 [4,] 12 2 15 10 18 [5,] 16 1 2 20 16 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3668628 1.7546933 -0.3486594 0.07264115 0.368461 -1.1039815 [2,] 0.2025964 0.7280572 -0.2645908 -1.33243556 -2.020288 0.2342374 [3,] 1.4636910 1.1040604 -0.4563125 0.92775374 -2.023329 0.1340257 [4,] 0.4179604 -0.4939142 -0.6227031 0.01408507 2.240384 0.6724036 [5,] -2.0787511 -0.2848816 -1.7624446 1.08997911 1.002424 0.5870199 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.18950791 -0.2393081 -0.59488361 0.8674683 1.5634537 0.29467508 [2,] 0.03294206 0.1762281 0.39873138 2.0698385 -0.2512929 -0.02454012 [3,] -1.24707940 -0.4765269 0.03250237 1.0777776 0.5182649 1.26548916 [4,] -0.60529418 0.5635240 0.50916910 -0.6981107 0.2851701 -1.37516691 [5,] 0.37147759 0.8315285 1.02594405 -1.1383830 -1.1066036 -1.26043007 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.1770838 -0.8323720 -0.9298622 0.9845415 -0.45739124 -0.4425665 [2,] 1.2242318 2.6138727 0.8654447 0.4896868 -1.20639783 0.2967064 [3,] -0.7394664 -0.2724647 -0.9741123 -2.1721345 0.81334407 1.1748405 [4,] -0.4149005 -0.2380993 1.0610024 0.2787452 -0.01490953 0.3465055 [5,] 0.2143761 -0.3837163 2.0933817 -0.1376298 1.64051953 -0.3036604 [,19] [,20] [1,] -0.57700202 0.1900663 [2,] -1.15018766 -0.4917279 [3,] 0.59586246 0.6130112 [4,] -0.01646203 0.7413820 [5,] -1.76480432 0.7726230 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 565 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.014576 2.086757 -0.2979246 -2.594755 0.6332281 -0.02810552 -0.2300952 col8 col9 col10 col11 col12 col13 col14 row1 0.131107 0.6981747 0.1563306 2.179837 0.8482107 1.007104 0.3558196 col15 col16 col17 col18 col19 col20 row1 1.324013 -0.2068943 -0.364311 -1.435682 0.3661159 0.575197 > tmp[,"col10"] col10 row1 0.1563306 row2 0.3559434 row3 -0.8729983 row4 -0.7045716 row5 -2.4570432 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -1.014576 2.08675735 -0.2979246 -2.5947551 0.6332281 -0.02810552 row5 0.679348 -0.07978862 -0.5596962 0.7114432 -1.1976331 0.16937535 col7 col8 col9 col10 col11 col12 col13 row1 -0.2300952 0.1311070 0.6981747 0.1563306 2.179837 0.8482107 1.007104 row5 -1.0771323 0.1830472 1.2866297 -2.4570432 1.893625 0.2866150 1.147246 col14 col15 col16 col17 col18 col19 col20 row1 0.3558196 1.3240126 -0.2068943 -0.3643110 -1.435682 0.3661159 0.57519696 row5 0.7109768 -0.8248809 0.4455979 -0.5592801 1.940140 -0.1859196 0.09289706 > tmp[,c("col6","col20")] col6 col20 row1 -0.02810552 0.57519696 row2 0.42790924 -0.18364197 row3 1.75652214 1.12711793 row4 1.42878635 -0.36769999 row5 0.16937535 0.09289706 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.02810552 0.57519696 row5 0.16937535 0.09289706 > > > > > 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.19243 50.37921 50.69613 49.71438 50.69526 105.9935 50.65556 50.25503 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.30239 51.28202 50.15635 49.82418 49.87733 48.99284 49.04452 50.24231 col17 col18 col19 col20 row1 49.71489 50.6178 49.27048 104.7509 > tmp[,"col10"] col10 row1 51.28202 row2 28.21679 row3 29.70443 row4 30.53831 row5 51.96302 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.19243 50.37921 50.69613 49.71438 50.69526 105.9935 50.65556 50.25503 row5 49.95789 47.29417 50.10433 49.72877 51.15100 104.6129 50.27904 48.61535 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.30239 51.28202 50.15635 49.82418 49.87733 48.99284 49.04452 50.24231 row5 47.73299 51.96302 49.72670 51.05406 50.48712 47.84254 48.73597 48.18613 col17 col18 col19 col20 row1 49.71489 50.6178 49.27048 104.7509 row5 50.05716 50.3494 48.49564 104.2234 > tmp[,c("col6","col20")] col6 col20 row1 105.99350 104.75091 row2 73.09008 77.52676 row3 75.10872 75.24664 row4 77.56938 74.77456 row5 104.61285 104.22345 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.9935 104.7509 row5 104.6129 104.2234 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.9935 104.7509 row5 104.6129 104.2234 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.6041635 [2,] 0.3528509 [3,] -1.4320080 [4,] 0.5438869 [5,] -0.1780306 > tmp[,c("col17","col7")] col17 col7 [1,] 0.6368514 -0.5715581 [2,] -2.8813572 -0.4161729 [3,] -0.2795839 0.7050353 [4,] -2.6374271 -0.4880096 [5,] -0.4516077 -0.3753301 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.4052012 0.9419933 [2,] -0.1921851 1.3529049 [3,] -1.1292319 -0.6350370 [4,] -1.7203203 -0.9963276 [5,] 0.8312710 -1.7668072 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.4052012 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.4052012 [2,] -0.1921851 > > > > 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.1985682 -1.1904062 -1.439946 0.6994888 -1.5114404 -1.129716 -0.8122157 row1 -0.4713829 0.5759374 1.231680 -0.8666000 0.2587583 -1.862699 0.2062910 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.2575272 0.02575101 0.2752429 -0.07998785 1.1676557 2.1481419 row1 -0.7242930 -0.51253326 -1.1776106 -1.17763964 0.4841293 -0.8006534 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.1247507 -1.0949811 1.442622192 -0.2691409 0.7879244 0.42840630 row1 1.0144600 -0.1475249 -0.006197174 -0.9349810 0.4412890 0.02710369 [,20] row3 -0.8219898 row1 0.3842660 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.6340269 -0.6690196 0.8090956 -0.4991753 -0.1286573 2.084108 1.934465 [,8] [,9] [,10] row2 -0.5937458 1.71689 -0.2164834 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.24474 -0.4205542 0.6215068 0.3823082 1.919793 -1.491473 0.1693454 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.2606985 -0.1220892 0.1905437 0.1800126 0.3350888 -1.104018 -0.7577094 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.555015 0.1146324 -1.057031 -0.8558927 0.5187367 -0.3277609 > > > 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: 0x564df53f3e80> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc62e045b3f" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc678116a08" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc6478418fd" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc61518a0a2" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc6ac391ed" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc67693a028" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc620442221" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc660e717" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc69fadf31" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc64a85e3c9" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc62fa211a0" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc658a7d683" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc6541403d4" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc63509c627" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM21dfc67a522d87" > > > ### 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: 0x564df48be100> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x564df48be100> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x564df48be100> > rowMedians(tmp) [1] -0.072377882 0.347109724 0.172234566 -0.113283278 0.089810451 [6] -0.036394419 -0.135394318 -0.173540361 0.492589921 -0.565420836 [11] 0.077355957 -0.400179957 0.158027797 -0.155815617 0.097683932 [16] -0.444122758 -0.059242964 -0.526042951 0.423104287 0.224531506 [21] -0.349015487 -0.042400224 0.229100033 -0.630781464 -0.234311032 [26] -0.555859370 -0.455449016 -0.229465469 0.697438476 -0.686161463 [31] 0.637075009 0.279528646 0.117562586 -0.193406180 0.240528077 [36] 0.217995940 -0.109962283 -0.176619614 0.561769620 0.192059170 [41] -0.452467411 -0.105071192 0.008208692 0.078906875 -0.004208612 [46] 0.309253848 0.420011511 -0.274124625 0.016502458 -0.289999909 [51] -0.174847354 -0.570742226 -0.155824333 -0.710651052 0.480357419 [56] 0.349227541 -0.471943113 0.096794016 0.153734511 0.494527385 [61] -0.310550685 0.283169999 0.287161629 -0.054960199 0.835342958 [66] 0.011659361 -0.735129812 0.267150503 0.160227360 -0.442786722 [71] -0.268180473 0.021047244 -0.314219588 0.514691732 0.440193870 [76] 0.380315463 -0.716421306 -0.131976297 -0.615099547 0.234300723 [81] -0.096925580 -0.242501098 0.127379912 0.190834737 0.271672050 [86] -0.282030870 0.311635205 0.146138894 -0.351237534 0.673592076 [91] -0.206198230 -0.007822504 0.258193539 0.602508095 0.446292553 [96] -0.114547732 -0.061117061 -0.019368641 0.192538884 0.488883886 [101] 0.246757237 0.543696207 -0.036340625 0.129413310 -0.107905140 [106] -0.116423841 -0.311422751 -0.051132749 0.183955088 -0.170577398 [111] -0.094887437 0.593410224 0.107094446 0.034749698 0.066872357 [116] 0.247481876 -0.364961807 0.379905392 -0.184268800 -0.191881763 [121] -0.071004818 -0.042272599 0.013330831 0.160744082 0.231046392 [126] -0.750707304 -0.015141915 0.247462124 0.182165115 -0.263039455 [131] -0.273628937 0.351223393 0.224979820 0.121593150 0.108841602 [136] 0.351279244 0.184366268 -0.607410732 0.486411439 0.030348096 [141] 0.186450592 -0.145151998 0.320408764 0.047737534 -0.231593525 [146] -0.321971654 -0.006280087 0.232262200 0.145229556 -0.227445661 [151] -0.407306225 0.087361649 0.243743508 -0.095390175 0.009829839 [156] -0.063364688 0.310049425 0.243585161 0.218579523 -0.143704696 [161] -0.324292241 -0.265231896 0.030256619 -0.460519227 -0.166909009 [166] 0.043602850 -0.312890396 0.312126162 -0.313289369 0.057028665 [171] -0.393836071 0.203996213 0.289255447 0.016632005 0.484196646 [176] -0.043430008 -0.204310350 0.233241926 0.540710284 -0.151565078 [181] -0.355389043 -0.440633716 -0.116656788 0.256620401 0.138494850 [186] -0.209333160 -0.022307565 -0.158679009 0.242129185 0.518673390 [191] 0.140843200 0.371066122 -0.285870792 0.203892769 -0.246379933 [196] -0.155463910 -0.431678462 -0.515513771 -0.318073506 -0.115495442 [201] 0.127949078 -0.051485627 -0.933423757 0.032287485 -0.202130530 [206] -0.538227997 -0.720889738 0.177156552 0.163223913 -0.016942165 [211] -0.669376013 0.229174599 0.097980569 0.424434828 -0.001184792 [216] -0.306169799 0.139636325 0.203967043 -0.444681592 -0.111523262 [221] 0.217614667 -0.339387995 0.291678081 0.356403357 0.136778941 [226] 0.121631012 -0.217587033 0.238010612 -0.205569116 -0.031614515 > > proc.time() user system elapsed 1.292 0.649 1.932
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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: 0x556b3f7d8950> > .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: 0x556b3f7d8950> > .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: 0x556b3f7d8950> > .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: 0x556b3f7d8950> > 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: 0x556b41058860> > .Call("R_bm_AddColumn",P) <pointer: 0x556b41058860> > .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: 0x556b41058860> > .Call("R_bm_AddColumn",P) <pointer: 0x556b41058860> > .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: 0x556b41058860> > 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: 0x556b410a3c10> > .Call("R_bm_AddColumn",P) <pointer: 0x556b410a3c10> > .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: 0x556b410a3c10> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x556b410a3c10> > .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: 0x556b410a3c10> > > .Call("R_bm_RowMode",P) <pointer: 0x556b410a3c10> > .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: 0x556b410a3c10> > > .Call("R_bm_ColMode",P) <pointer: 0x556b410a3c10> > .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: 0x556b410a3c10> > 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: 0x556b40a41230> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x556b40a41230> > .Call("R_bm_AddColumn",P) <pointer: 0x556b40a41230> > .Call("R_bm_AddColumn",P) <pointer: 0x556b40a41230> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile21e134403f192e" "BufferedMatrixFile21e1345fbdee9a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile21e134403f192e" "BufferedMatrixFile21e1345fbdee9a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x556b3fd59700> > .Call("R_bm_AddColumn",P) <pointer: 0x556b3fd59700> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x556b3fd59700> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x556b3fd59700> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x556b3fd59700> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x556b3fd59700> > .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: 0x556b3fd99050> > .Call("R_bm_AddColumn",P) <pointer: 0x556b3fd99050> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x556b3fd99050> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x556b3fd99050> > 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: 0x556b3ff1aa30> > .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: 0x556b3ff1aa30> > rm(P) > > proc.time() user system elapsed 0.269 0.042 0.300
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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.247 0.056 0.292