Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-06-28 17:39 -0400 (Fri, 28 Jun 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4760 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup" | 4494 |
merida1 | macOS 12.7.4 Monterey | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4508 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4466 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4362 |
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 | ![]() | ||||||||
merida1 | macOS 12.7.4 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | 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.68.0 |
Command: /home/biocbuild/bbs-3.19-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.19-bioc/R/site-library --timings BufferedMatrix_1.68.0.tar.gz |
StartedAt: 2024-06-26 21:13:27 -0400 (Wed, 26 Jun 2024) |
EndedAt: 2024-06-26 21:13:51 -0400 (Wed, 26 Jun 2024) |
EllapsedTime: 24.1 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.19-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.19-bioc/R/site-library --timings BufferedMatrix_1.68.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.0 (2024-04-24) * 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.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 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.19-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.19-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.19-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.19-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.19-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.19-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.19-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.19-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.19-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.19-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.0 (2024-04-24) -- "Puppy Cup" 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.257 0.045 0.290
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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.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 471778 25.2 1026221 54.9 643431 34.4 Vcells 871899 6.7 8388608 64.0 2046580 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] "Wed Jun 26 21:13:42 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Jun 26 21:13:42 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: 0x557e0160e440> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Jun 26 21:13:43 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Jun 26 21:13:43 2024" > > ColMode(tmp2) <pointer: 0x557e0160e440> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.128076 1.29993358 0.7165912 -0.3213029 [2,] -1.703297 -0.04883745 -0.3610706 0.2479757 [3,] 1.175908 1.46838215 -0.2464409 0.3634658 [4,] 0.946488 0.01235557 -0.5447740 0.4865162 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/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,] 98.128076 1.29993358 0.7165912 0.3213029 [2,] 1.703297 0.04883745 0.3610706 0.2479757 [3,] 1.175908 1.46838215 0.2464409 0.3634658 [4,] 0.946488 0.01235557 0.5447740 0.4865162 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/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.9059617 1.1401463 0.8465171 0.5668358 [2,] 1.3051044 0.2209920 0.6008915 0.4979716 [3,] 1.0843928 1.2117682 0.4964282 0.6028812 [4,] 0.9728762 0.1111556 0.7380881 0.6975071 > > 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.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,] 222.18769 37.70140 34.18176 30.98966 [2,] 39.75434 27.25876 31.36999 30.22769 [3,] 37.01984 38.58606 30.21072 31.39228 [4,] 35.67525 26.12391 32.92566 32.46159 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x557e011803b0> > exp(tmp5) <pointer: 0x557e011803b0> > log(tmp5,2) <pointer: 0x557e011803b0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 462.4546 > Min(tmp5) [1] 53.34354 > mean(tmp5) [1] 71.86558 > Sum(tmp5) [1] 14373.12 > Var(tmp5) [1] 840.7847 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 85.71089 69.52724 70.12736 71.09549 68.48577 70.48827 72.14850 71.33142 [9] 70.52864 69.21226 > rowSums(tmp5) [1] 1714.218 1390.545 1402.547 1421.910 1369.715 1409.765 1442.970 1426.628 [9] 1410.573 1384.245 > rowVars(tmp5) [1] 7905.82165 43.53105 64.59957 80.21487 72.29752 93.74045 [7] 57.63862 100.18674 84.45736 68.58540 > rowSd(tmp5) [1] 88.914687 6.597807 8.037386 8.956276 8.502795 9.681965 7.592010 [8] 10.009333 9.190069 8.281630 > rowMax(tmp5) [1] 462.45457 82.74345 88.08163 86.29615 84.48248 90.14023 89.06012 [8] 92.24273 89.92445 84.28614 > rowMin(tmp5) [1] 53.94763 56.73553 58.47321 54.37350 54.12502 56.63315 60.17438 53.34354 [9] 55.76599 59.09232 > > colMeans(tmp5) [1] 111.43750 69.38914 67.22416 68.25115 70.79520 66.72230 70.36205 [8] 71.79602 64.97738 67.76061 71.43156 69.47718 73.04703 72.54610 [15] 68.58514 67.39691 72.31174 70.52291 68.57750 74.70008 > colSums(tmp5) [1] 1114.3750 693.8914 672.2416 682.5115 707.9520 667.2230 703.6205 [8] 717.9602 649.7738 677.6061 714.3156 694.7718 730.4703 725.4610 [15] 685.8514 673.9691 723.1174 705.2291 685.7750 747.0008 > colVars(tmp5) [1] 15314.02267 80.27677 54.19242 27.47161 62.28259 42.89737 [7] 132.31948 83.85311 63.17054 38.95074 94.08356 79.78637 [13] 54.03159 78.37197 88.61406 37.95651 108.58614 80.01137 [19] 30.75284 83.30874 > colSd(tmp5) [1] 123.749839 8.959731 7.361550 5.241337 7.891932 6.549608 [7] 11.503020 9.157134 7.947990 6.241052 9.699668 8.932322 [13] 7.350618 8.852794 9.413504 6.160885 10.420467 8.944907 [19] 5.545525 9.127362 > colMax(tmp5) [1] 462.45457 80.31184 81.46316 79.15406 81.08830 73.69268 85.06774 [8] 86.29615 78.15673 74.12539 84.48248 90.14023 84.86683 87.86257 [15] 89.92445 77.64222 92.24273 88.08163 78.42319 89.06012 > colMin(tmp5) [1] 57.77062 54.37350 58.96375 62.91498 58.35480 55.76599 53.34354 54.34408 [9] 58.07365 54.12502 60.17438 62.14366 62.38722 59.55240 58.07183 58.47321 [17] 61.05177 57.22658 58.10106 57.90320 > > > ### 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] 85.71089 69.52724 70.12736 71.09549 68.48577 70.48827 72.14850 71.33142 [9] 70.52864 NA > rowSums(tmp5) [1] 1714.218 1390.545 1402.547 1421.910 1369.715 1409.765 1442.970 1426.628 [9] 1410.573 NA > rowVars(tmp5) [1] 7905.82165 43.53105 64.59957 80.21487 72.29752 93.74045 [7] 57.63862 100.18674 84.45736 68.50134 > rowSd(tmp5) [1] 88.914687 6.597807 8.037386 8.956276 8.502795 9.681965 7.592010 [8] 10.009333 9.190069 8.276553 > rowMax(tmp5) [1] 462.45457 82.74345 88.08163 86.29615 84.48248 90.14023 89.06012 [8] 92.24273 89.92445 NA > rowMin(tmp5) [1] 53.94763 56.73553 58.47321 54.37350 54.12502 56.63315 60.17438 53.34354 [9] 55.76599 NA > > colMeans(tmp5) [1] 111.43750 69.38914 67.22416 68.25115 70.79520 66.72230 70.36205 [8] 71.79602 64.97738 67.76061 71.43156 69.47718 73.04703 72.54610 [15] 68.58514 67.39691 NA 70.52291 68.57750 74.70008 > colSums(tmp5) [1] 1114.3750 693.8914 672.2416 682.5115 707.9520 667.2230 703.6205 [8] 717.9602 649.7738 677.6061 714.3156 694.7718 730.4703 725.4610 [15] 685.8514 673.9691 NA 705.2291 685.7750 747.0008 > colVars(tmp5) [1] 15314.02267 80.27677 54.19242 27.47161 62.28259 42.89737 [7] 132.31948 83.85311 63.17054 38.95074 94.08356 79.78637 [13] 54.03159 78.37197 88.61406 37.95651 NA 80.01137 [19] 30.75284 83.30874 > colSd(tmp5) [1] 123.749839 8.959731 7.361550 5.241337 7.891932 6.549608 [7] 11.503020 9.157134 7.947990 6.241052 9.699668 8.932322 [13] 7.350618 8.852794 9.413504 6.160885 NA 8.944907 [19] 5.545525 9.127362 > colMax(tmp5) [1] 462.45457 80.31184 81.46316 79.15406 81.08830 73.69268 85.06774 [8] 86.29615 78.15673 74.12539 84.48248 90.14023 84.86683 87.86257 [15] 89.92445 77.64222 NA 88.08163 78.42319 89.06012 > colMin(tmp5) [1] 57.77062 54.37350 58.96375 62.91498 58.35480 55.76599 53.34354 54.34408 [9] 58.07365 54.12502 60.17438 62.14366 62.38722 59.55240 58.07183 58.47321 [17] NA 57.22658 58.10106 57.90320 > > Max(tmp5,na.rm=TRUE) [1] 462.4546 > Min(tmp5,na.rm=TRUE) [1] 53.34354 > mean(tmp5,na.rm=TRUE) [1] 71.91992 > Sum(tmp5,na.rm=TRUE) [1] 14312.06 > Var(tmp5,na.rm=TRUE) [1] 844.4375 > > rowMeans(tmp5,na.rm=TRUE) [1] 85.71089 69.52724 70.12736 71.09549 68.48577 70.48827 72.14850 71.33142 [9] 70.52864 69.64176 > rowSums(tmp5,na.rm=TRUE) [1] 1714.218 1390.545 1402.547 1421.910 1369.715 1409.765 1442.970 1426.628 [9] 1410.573 1323.193 > rowVars(tmp5,na.rm=TRUE) [1] 7905.82165 43.53105 64.59957 80.21487 72.29752 93.74045 [7] 57.63862 100.18674 84.45736 68.50134 > rowSd(tmp5,na.rm=TRUE) [1] 88.914687 6.597807 8.037386 8.956276 8.502795 9.681965 7.592010 [8] 10.009333 9.190069 8.276553 > rowMax(tmp5,na.rm=TRUE) [1] 462.45457 82.74345 88.08163 86.29615 84.48248 90.14023 89.06012 [8] 92.24273 89.92445 84.28614 > rowMin(tmp5,na.rm=TRUE) [1] 53.94763 56.73553 58.47321 54.37350 54.12502 56.63315 60.17438 53.34354 [9] 55.76599 59.09232 > > colMeans(tmp5,na.rm=TRUE) [1] 111.43750 69.38914 67.22416 68.25115 70.79520 66.72230 70.36205 [8] 71.79602 64.97738 67.76061 71.43156 69.47718 73.04703 72.54610 [15] 68.58514 67.39691 73.56285 70.52291 68.57750 74.70008 > colSums(tmp5,na.rm=TRUE) [1] 1114.3750 693.8914 672.2416 682.5115 707.9520 667.2230 703.6205 [8] 717.9602 649.7738 677.6061 714.3156 694.7718 730.4703 725.4610 [15] 685.8514 673.9691 662.0657 705.2291 685.7750 747.0008 > colVars(tmp5,na.rm=TRUE) [1] 15314.02267 80.27677 54.19242 27.47161 62.28259 42.89737 [7] 132.31948 83.85311 63.17054 38.95074 94.08356 79.78637 [13] 54.03159 78.37197 88.61406 37.95651 104.55009 80.01137 [19] 30.75284 83.30874 > colSd(tmp5,na.rm=TRUE) [1] 123.749839 8.959731 7.361550 5.241337 7.891932 6.549608 [7] 11.503020 9.157134 7.947990 6.241052 9.699668 8.932322 [13] 7.350618 8.852794 9.413504 6.160885 10.224974 8.944907 [19] 5.545525 9.127362 > colMax(tmp5,na.rm=TRUE) [1] 462.45457 80.31184 81.46316 79.15406 81.08830 73.69268 85.06774 [8] 86.29615 78.15673 74.12539 84.48248 90.14023 84.86683 87.86257 [15] 89.92445 77.64222 92.24273 88.08163 78.42319 89.06012 > colMin(tmp5,na.rm=TRUE) [1] 57.77062 54.37350 58.96375 62.91498 58.35480 55.76599 53.34354 54.34408 [9] 58.07365 54.12502 60.17438 62.14366 62.38722 59.55240 58.07183 58.47321 [17] 63.96149 57.22658 58.10106 57.90320 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 85.71089 69.52724 70.12736 71.09549 68.48577 70.48827 72.14850 71.33142 [9] 70.52864 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1714.218 1390.545 1402.547 1421.910 1369.715 1409.765 1442.970 1426.628 [9] 1410.573 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7905.82165 43.53105 64.59957 80.21487 72.29752 93.74045 [7] 57.63862 100.18674 84.45736 NA > rowSd(tmp5,na.rm=TRUE) [1] 88.914687 6.597807 8.037386 8.956276 8.502795 9.681965 7.592010 [8] 10.009333 9.190069 NA > rowMax(tmp5,na.rm=TRUE) [1] 462.45457 82.74345 88.08163 86.29615 84.48248 90.14023 89.06012 [8] 92.24273 89.92445 NA > rowMin(tmp5,na.rm=TRUE) [1] 53.94763 56.73553 58.47321 54.37350 54.12502 56.63315 60.17438 53.34354 [9] 55.76599 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.17024 70.13880 68.12770 67.41254 70.73640 65.94781 70.77268 [8] 71.65349 63.67130 68.39143 72.64808 70.26687 71.89641 71.86556 [15] 69.57495 66.84476 NaN 69.91158 68.97953 73.63496 > colSums(tmp5,na.rm=TRUE) [1] 1054.5321 631.2492 613.1493 606.7129 636.6276 593.5303 636.9541 [8] 644.8814 573.0417 615.5229 653.8327 632.4019 647.0677 646.7900 [15] 626.1745 601.6028 0.0000 629.2042 620.8158 662.7147 > colVars(tmp5,na.rm=TRUE) [1] 16858.55196 83.98901 51.78218 22.99383 70.02902 41.51144 [7] 146.96250 94.10621 51.87616 39.34279 89.19493 82.74401 [13] 45.89143 82.95814 88.66899 39.27121 NA 85.80834 [19] 32.77864 80.95948 > colSd(tmp5,na.rm=TRUE) [1] 129.840487 9.164552 7.195984 4.795189 8.368334 6.442938 [7] 12.122809 9.700836 7.202511 6.272383 9.444307 9.096374 [13] 6.774322 9.108136 9.416421 6.266675 NA 9.263279 [19] 5.725263 8.997748 > colMax(tmp5,na.rm=TRUE) [1] 462.45457 80.31184 81.46316 79.15406 81.08830 73.58141 85.06774 [8] 86.29615 78.15673 74.12539 84.48248 90.14023 84.86683 87.86257 [15] 89.92445 77.64222 -Inf 88.08163 78.42319 89.06012 > colMin(tmp5,na.rm=TRUE) [1] 57.77062 54.37350 58.96375 62.91498 58.35480 55.76599 53.34354 54.34408 [9] 58.07365 54.12502 60.17438 62.14366 62.38722 59.55240 58.07183 58.47321 [17] Inf 57.22658 58.10106 57.90320 > > > > > 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] 271.7774 191.7606 232.1663 124.9190 193.3034 154.5165 321.2738 389.6992 [9] 158.8390 183.1604 > apply(copymatrix,1,var,na.rm=TRUE) [1] 271.7774 191.7606 232.1663 124.9190 193.3034 154.5165 321.2738 389.6992 [9] 158.8390 183.1604 > > > > 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] 8.526513e-14 -9.947598e-14 -2.842171e-14 1.136868e-13 0.000000e+00 [6] 2.842171e-13 -1.136868e-13 1.136868e-13 -5.684342e-14 0.000000e+00 [11] 1.705303e-13 -5.684342e-14 1.136868e-13 1.705303e-13 0.000000e+00 [16] 5.684342e-14 0.000000e+00 -1.989520e-13 5.684342e-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) + } 9 5 4 18 1 8 5 5 3 14 2 12 7 20 1 2 10 2 3 9 10 1 5 12 8 14 8 12 8 4 2 15 6 10 10 10 1 1 2 18 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.519074 > Min(tmp) [1] -3.578609 > mean(tmp) [1] -0.05473623 > Sum(tmp) [1] -5.473623 > Var(tmp) [1] 1.205853 > > rowMeans(tmp) [1] -0.05473623 > rowSums(tmp) [1] -5.473623 > rowVars(tmp) [1] 1.205853 > rowSd(tmp) [1] 1.098113 > rowMax(tmp) [1] 2.519074 > rowMin(tmp) [1] -3.578609 > > colMeans(tmp) [1] -0.893510373 -1.406917781 1.480850210 -1.596825146 0.126353849 [6] -0.729089291 -1.043840085 0.810958587 -0.682850025 0.101008147 [11] -0.245541386 0.682835605 -0.156529265 -0.981570643 -1.125753636 [16] 0.462357406 0.342090867 1.079926084 0.031969173 1.058184151 [21] -0.569204412 -0.598110115 1.556023881 -0.497832639 -1.438766416 [26] -0.923379875 0.063270935 0.113370793 0.913479863 -1.237495183 [31] 0.075883734 0.196959785 -0.627714635 -0.624941002 -3.222886261 [36] -1.750730870 0.450863532 0.022262532 0.662681173 0.504107014 [41] -0.658281004 0.384304827 -0.008500207 1.010567324 -0.429678756 [46] 0.173876420 0.082645606 1.313453480 -0.423275634 1.036786529 [51] -0.522788146 -1.574743482 -0.246883523 1.462457415 0.639219862 [56] 0.306261381 -1.988427746 -0.346345760 -0.272625070 -0.595711265 [61] 0.843043183 2.519074239 1.317445036 0.701762099 -1.024176708 [66] -0.233889401 0.460071967 -1.312369032 1.456480212 2.119896271 [71] -0.317352721 0.205314814 1.717844144 1.400037449 1.394602230 [76] 1.234619380 1.940103305 -0.052803393 -0.316237740 1.464392026 [81] -3.578608815 0.044152633 -1.839403950 2.072674344 -1.010596654 [86] 0.688560676 -1.638731458 -1.635833674 -0.966836477 -0.810107714 [91] 0.448712566 -0.795202114 -0.858666689 0.501381604 -0.665367658 [96] -0.121452973 0.181158194 -0.695402577 -0.324043190 0.287872979 > colSums(tmp) [1] -0.893510373 -1.406917781 1.480850210 -1.596825146 0.126353849 [6] -0.729089291 -1.043840085 0.810958587 -0.682850025 0.101008147 [11] -0.245541386 0.682835605 -0.156529265 -0.981570643 -1.125753636 [16] 0.462357406 0.342090867 1.079926084 0.031969173 1.058184151 [21] -0.569204412 -0.598110115 1.556023881 -0.497832639 -1.438766416 [26] -0.923379875 0.063270935 0.113370793 0.913479863 -1.237495183 [31] 0.075883734 0.196959785 -0.627714635 -0.624941002 -3.222886261 [36] -1.750730870 0.450863532 0.022262532 0.662681173 0.504107014 [41] -0.658281004 0.384304827 -0.008500207 1.010567324 -0.429678756 [46] 0.173876420 0.082645606 1.313453480 -0.423275634 1.036786529 [51] -0.522788146 -1.574743482 -0.246883523 1.462457415 0.639219862 [56] 0.306261381 -1.988427746 -0.346345760 -0.272625070 -0.595711265 [61] 0.843043183 2.519074239 1.317445036 0.701762099 -1.024176708 [66] -0.233889401 0.460071967 -1.312369032 1.456480212 2.119896271 [71] -0.317352721 0.205314814 1.717844144 1.400037449 1.394602230 [76] 1.234619380 1.940103305 -0.052803393 -0.316237740 1.464392026 [81] -3.578608815 0.044152633 -1.839403950 2.072674344 -1.010596654 [86] 0.688560676 -1.638731458 -1.635833674 -0.966836477 -0.810107714 [91] 0.448712566 -0.795202114 -0.858666689 0.501381604 -0.665367658 [96] -0.121452973 0.181158194 -0.695402577 -0.324043190 0.287872979 > 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.893510373 -1.406917781 1.480850210 -1.596825146 0.126353849 [6] -0.729089291 -1.043840085 0.810958587 -0.682850025 0.101008147 [11] -0.245541386 0.682835605 -0.156529265 -0.981570643 -1.125753636 [16] 0.462357406 0.342090867 1.079926084 0.031969173 1.058184151 [21] -0.569204412 -0.598110115 1.556023881 -0.497832639 -1.438766416 [26] -0.923379875 0.063270935 0.113370793 0.913479863 -1.237495183 [31] 0.075883734 0.196959785 -0.627714635 -0.624941002 -3.222886261 [36] -1.750730870 0.450863532 0.022262532 0.662681173 0.504107014 [41] -0.658281004 0.384304827 -0.008500207 1.010567324 -0.429678756 [46] 0.173876420 0.082645606 1.313453480 -0.423275634 1.036786529 [51] -0.522788146 -1.574743482 -0.246883523 1.462457415 0.639219862 [56] 0.306261381 -1.988427746 -0.346345760 -0.272625070 -0.595711265 [61] 0.843043183 2.519074239 1.317445036 0.701762099 -1.024176708 [66] -0.233889401 0.460071967 -1.312369032 1.456480212 2.119896271 [71] -0.317352721 0.205314814 1.717844144 1.400037449 1.394602230 [76] 1.234619380 1.940103305 -0.052803393 -0.316237740 1.464392026 [81] -3.578608815 0.044152633 -1.839403950 2.072674344 -1.010596654 [86] 0.688560676 -1.638731458 -1.635833674 -0.966836477 -0.810107714 [91] 0.448712566 -0.795202114 -0.858666689 0.501381604 -0.665367658 [96] -0.121452973 0.181158194 -0.695402577 -0.324043190 0.287872979 > colMin(tmp) [1] -0.893510373 -1.406917781 1.480850210 -1.596825146 0.126353849 [6] -0.729089291 -1.043840085 0.810958587 -0.682850025 0.101008147 [11] -0.245541386 0.682835605 -0.156529265 -0.981570643 -1.125753636 [16] 0.462357406 0.342090867 1.079926084 0.031969173 1.058184151 [21] -0.569204412 -0.598110115 1.556023881 -0.497832639 -1.438766416 [26] -0.923379875 0.063270935 0.113370793 0.913479863 -1.237495183 [31] 0.075883734 0.196959785 -0.627714635 -0.624941002 -3.222886261 [36] -1.750730870 0.450863532 0.022262532 0.662681173 0.504107014 [41] -0.658281004 0.384304827 -0.008500207 1.010567324 -0.429678756 [46] 0.173876420 0.082645606 1.313453480 -0.423275634 1.036786529 [51] -0.522788146 -1.574743482 -0.246883523 1.462457415 0.639219862 [56] 0.306261381 -1.988427746 -0.346345760 -0.272625070 -0.595711265 [61] 0.843043183 2.519074239 1.317445036 0.701762099 -1.024176708 [66] -0.233889401 0.460071967 -1.312369032 1.456480212 2.119896271 [71] -0.317352721 0.205314814 1.717844144 1.400037449 1.394602230 [76] 1.234619380 1.940103305 -0.052803393 -0.316237740 1.464392026 [81] -3.578608815 0.044152633 -1.839403950 2.072674344 -1.010596654 [86] 0.688560676 -1.638731458 -1.635833674 -0.966836477 -0.810107714 [91] 0.448712566 -0.795202114 -0.858666689 0.501381604 -0.665367658 [96] -0.121452973 0.181158194 -0.695402577 -0.324043190 0.287872979 > colMedians(tmp) [1] -0.893510373 -1.406917781 1.480850210 -1.596825146 0.126353849 [6] -0.729089291 -1.043840085 0.810958587 -0.682850025 0.101008147 [11] -0.245541386 0.682835605 -0.156529265 -0.981570643 -1.125753636 [16] 0.462357406 0.342090867 1.079926084 0.031969173 1.058184151 [21] -0.569204412 -0.598110115 1.556023881 -0.497832639 -1.438766416 [26] -0.923379875 0.063270935 0.113370793 0.913479863 -1.237495183 [31] 0.075883734 0.196959785 -0.627714635 -0.624941002 -3.222886261 [36] -1.750730870 0.450863532 0.022262532 0.662681173 0.504107014 [41] -0.658281004 0.384304827 -0.008500207 1.010567324 -0.429678756 [46] 0.173876420 0.082645606 1.313453480 -0.423275634 1.036786529 [51] -0.522788146 -1.574743482 -0.246883523 1.462457415 0.639219862 [56] 0.306261381 -1.988427746 -0.346345760 -0.272625070 -0.595711265 [61] 0.843043183 2.519074239 1.317445036 0.701762099 -1.024176708 [66] -0.233889401 0.460071967 -1.312369032 1.456480212 2.119896271 [71] -0.317352721 0.205314814 1.717844144 1.400037449 1.394602230 [76] 1.234619380 1.940103305 -0.052803393 -0.316237740 1.464392026 [81] -3.578608815 0.044152633 -1.839403950 2.072674344 -1.010596654 [86] 0.688560676 -1.638731458 -1.635833674 -0.966836477 -0.810107714 [91] 0.448712566 -0.795202114 -0.858666689 0.501381604 -0.665367658 [96] -0.121452973 0.181158194 -0.695402577 -0.324043190 0.287872979 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.8935104 -1.406918 1.48085 -1.596825 0.1263538 -0.7290893 -1.04384 [2,] -0.8935104 -1.406918 1.48085 -1.596825 0.1263538 -0.7290893 -1.04384 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.8109586 -0.68285 0.1010081 -0.2455414 0.6828356 -0.1565293 -0.9815706 [2,] 0.8109586 -0.68285 0.1010081 -0.2455414 0.6828356 -0.1565293 -0.9815706 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.125754 0.4623574 0.3420909 1.079926 0.03196917 1.058184 -0.5692044 [2,] -1.125754 0.4623574 0.3420909 1.079926 0.03196917 1.058184 -0.5692044 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.5981101 1.556024 -0.4978326 -1.438766 -0.9233799 0.06327093 0.1133708 [2,] -0.5981101 1.556024 -0.4978326 -1.438766 -0.9233799 0.06327093 0.1133708 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.9134799 -1.237495 0.07588373 0.1969598 -0.6277146 -0.624941 -3.222886 [2,] 0.9134799 -1.237495 0.07588373 0.1969598 -0.6277146 -0.624941 -3.222886 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.750731 0.4508635 0.02226253 0.6626812 0.504107 -0.658281 0.3843048 [2,] -1.750731 0.4508635 0.02226253 0.6626812 0.504107 -0.658281 0.3843048 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.008500207 1.010567 -0.4296788 0.1738764 0.08264561 1.313453 -0.4232756 [2,] -0.008500207 1.010567 -0.4296788 0.1738764 0.08264561 1.313453 -0.4232756 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.036787 -0.5227881 -1.574743 -0.2468835 1.462457 0.6392199 0.3062614 [2,] 1.036787 -0.5227881 -1.574743 -0.2468835 1.462457 0.6392199 0.3062614 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.988428 -0.3463458 -0.2726251 -0.5957113 0.8430432 2.519074 1.317445 [2,] -1.988428 -0.3463458 -0.2726251 -0.5957113 0.8430432 2.519074 1.317445 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.7017621 -1.024177 -0.2338894 0.460072 -1.312369 1.45648 2.119896 [2,] 0.7017621 -1.024177 -0.2338894 0.460072 -1.312369 1.45648 2.119896 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.3173527 0.2053148 1.717844 1.400037 1.394602 1.234619 1.940103 [2,] -0.3173527 0.2053148 1.717844 1.400037 1.394602 1.234619 1.940103 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.05280339 -0.3162377 1.464392 -3.578609 0.04415263 -1.839404 2.072674 [2,] -0.05280339 -0.3162377 1.464392 -3.578609 0.04415263 -1.839404 2.072674 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.010597 0.6885607 -1.638731 -1.635834 -0.9668365 -0.8101077 0.4487126 [2,] -1.010597 0.6885607 -1.638731 -1.635834 -0.9668365 -0.8101077 0.4487126 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.7952021 -0.8586667 0.5013816 -0.6653677 -0.121453 0.1811582 -0.6954026 [2,] -0.7952021 -0.8586667 0.5013816 -0.6653677 -0.121453 0.1811582 -0.6954026 [,99] [,100] [1,] -0.3240432 0.287873 [2,] -0.3240432 0.287873 > > > Max(tmp2) [1] 2.265421 > Min(tmp2) [1] -2.887667 > mean(tmp2) [1] 0.02955143 > Sum(tmp2) [1] 2.955143 > Var(tmp2) [1] 0.9408342 > > rowMeans(tmp2) [1] -0.68497097 1.46006818 -0.53238919 2.24400989 -0.04860129 -0.29416456 [7] -1.44978189 0.89093824 -0.90036433 -1.03768713 -0.57283235 -1.09684875 [13] 1.38984199 -0.21971234 -0.68378754 1.30322530 0.26979562 0.38444934 [19] -0.74306979 -0.72785705 1.64210466 -0.28506666 1.56040998 -1.17669004 [25] 0.13632741 1.36541129 0.38228625 0.15285755 1.14600428 0.46318445 [31] -1.62834301 1.15597419 -0.17666786 0.85782311 2.17608758 0.83280805 [37] -0.81210504 1.02841510 -0.53497169 -0.34414872 0.89055330 -0.66571680 [43] -0.36986037 0.01035013 0.43180041 -1.38451660 -1.56853307 -0.76936272 [49] 0.25855082 -0.09909284 1.06344937 1.09024674 0.61553547 -1.04196656 [55] -0.26213994 -1.45780036 0.39707956 0.14525400 0.32425919 0.64537404 [61] -0.25855944 0.70876093 -0.10373997 0.33888030 -0.59165502 0.15482112 [67] 0.94474586 -1.29925092 1.12899681 0.39380322 -0.12714013 0.68978112 [73] -0.44229162 -0.02740709 0.12707797 -0.09512242 1.00466226 1.14630801 [79] -0.92499943 -0.88718559 -0.43009231 -1.20587709 1.25210405 -0.50903861 [85] -1.35474724 -2.88766716 -0.60799269 1.23056825 1.08140805 -0.35872737 [91] -0.50185363 -0.12563443 -0.54601379 0.60878237 0.46015293 0.46988338 [97] -1.45499914 2.26542077 -1.57434143 0.11789587 > rowSums(tmp2) [1] -0.68497097 1.46006818 -0.53238919 2.24400989 -0.04860129 -0.29416456 [7] -1.44978189 0.89093824 -0.90036433 -1.03768713 -0.57283235 -1.09684875 [13] 1.38984199 -0.21971234 -0.68378754 1.30322530 0.26979562 0.38444934 [19] -0.74306979 -0.72785705 1.64210466 -0.28506666 1.56040998 -1.17669004 [25] 0.13632741 1.36541129 0.38228625 0.15285755 1.14600428 0.46318445 [31] -1.62834301 1.15597419 -0.17666786 0.85782311 2.17608758 0.83280805 [37] -0.81210504 1.02841510 -0.53497169 -0.34414872 0.89055330 -0.66571680 [43] -0.36986037 0.01035013 0.43180041 -1.38451660 -1.56853307 -0.76936272 [49] 0.25855082 -0.09909284 1.06344937 1.09024674 0.61553547 -1.04196656 [55] -0.26213994 -1.45780036 0.39707956 0.14525400 0.32425919 0.64537404 [61] -0.25855944 0.70876093 -0.10373997 0.33888030 -0.59165502 0.15482112 [67] 0.94474586 -1.29925092 1.12899681 0.39380322 -0.12714013 0.68978112 [73] -0.44229162 -0.02740709 0.12707797 -0.09512242 1.00466226 1.14630801 [79] -0.92499943 -0.88718559 -0.43009231 -1.20587709 1.25210405 -0.50903861 [85] -1.35474724 -2.88766716 -0.60799269 1.23056825 1.08140805 -0.35872737 [91] -0.50185363 -0.12563443 -0.54601379 0.60878237 0.46015293 0.46988338 [97] -1.45499914 2.26542077 -1.57434143 0.11789587 > 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.68497097 1.46006818 -0.53238919 2.24400989 -0.04860129 -0.29416456 [7] -1.44978189 0.89093824 -0.90036433 -1.03768713 -0.57283235 -1.09684875 [13] 1.38984199 -0.21971234 -0.68378754 1.30322530 0.26979562 0.38444934 [19] -0.74306979 -0.72785705 1.64210466 -0.28506666 1.56040998 -1.17669004 [25] 0.13632741 1.36541129 0.38228625 0.15285755 1.14600428 0.46318445 [31] -1.62834301 1.15597419 -0.17666786 0.85782311 2.17608758 0.83280805 [37] -0.81210504 1.02841510 -0.53497169 -0.34414872 0.89055330 -0.66571680 [43] -0.36986037 0.01035013 0.43180041 -1.38451660 -1.56853307 -0.76936272 [49] 0.25855082 -0.09909284 1.06344937 1.09024674 0.61553547 -1.04196656 [55] -0.26213994 -1.45780036 0.39707956 0.14525400 0.32425919 0.64537404 [61] -0.25855944 0.70876093 -0.10373997 0.33888030 -0.59165502 0.15482112 [67] 0.94474586 -1.29925092 1.12899681 0.39380322 -0.12714013 0.68978112 [73] -0.44229162 -0.02740709 0.12707797 -0.09512242 1.00466226 1.14630801 [79] -0.92499943 -0.88718559 -0.43009231 -1.20587709 1.25210405 -0.50903861 [85] -1.35474724 -2.88766716 -0.60799269 1.23056825 1.08140805 -0.35872737 [91] -0.50185363 -0.12563443 -0.54601379 0.60878237 0.46015293 0.46988338 [97] -1.45499914 2.26542077 -1.57434143 0.11789587 > rowMin(tmp2) [1] -0.68497097 1.46006818 -0.53238919 2.24400989 -0.04860129 -0.29416456 [7] -1.44978189 0.89093824 -0.90036433 -1.03768713 -0.57283235 -1.09684875 [13] 1.38984199 -0.21971234 -0.68378754 1.30322530 0.26979562 0.38444934 [19] -0.74306979 -0.72785705 1.64210466 -0.28506666 1.56040998 -1.17669004 [25] 0.13632741 1.36541129 0.38228625 0.15285755 1.14600428 0.46318445 [31] -1.62834301 1.15597419 -0.17666786 0.85782311 2.17608758 0.83280805 [37] -0.81210504 1.02841510 -0.53497169 -0.34414872 0.89055330 -0.66571680 [43] -0.36986037 0.01035013 0.43180041 -1.38451660 -1.56853307 -0.76936272 [49] 0.25855082 -0.09909284 1.06344937 1.09024674 0.61553547 -1.04196656 [55] -0.26213994 -1.45780036 0.39707956 0.14525400 0.32425919 0.64537404 [61] -0.25855944 0.70876093 -0.10373997 0.33888030 -0.59165502 0.15482112 [67] 0.94474586 -1.29925092 1.12899681 0.39380322 -0.12714013 0.68978112 [73] -0.44229162 -0.02740709 0.12707797 -0.09512242 1.00466226 1.14630801 [79] -0.92499943 -0.88718559 -0.43009231 -1.20587709 1.25210405 -0.50903861 [85] -1.35474724 -2.88766716 -0.60799269 1.23056825 1.08140805 -0.35872737 [91] -0.50185363 -0.12563443 -0.54601379 0.60878237 0.46015293 0.46988338 [97] -1.45499914 2.26542077 -1.57434143 0.11789587 > > colMeans(tmp2) [1] 0.02955143 > colSums(tmp2) [1] 2.955143 > colVars(tmp2) [1] 0.9408342 > colSd(tmp2) [1] 0.9699661 > colMax(tmp2) [1] 2.265421 > colMin(tmp2) [1] -2.887667 > colMedians(tmp2) [1] -0.03800419 > colRanges(tmp2) [,1] [1,] -2.887667 [2,] 2.265421 > > 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] -1.8976831 -4.6790177 5.9152885 2.0523701 -4.1253474 2.2863526 [7] 3.3821454 3.0418564 0.5561972 -3.1988190 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4310565 [2,] -0.7419885 [3,] -0.1238176 [4,] 0.1434086 [5,] 1.6026313 > > rowApply(tmp,sum) [1] 1.1601339 1.2820638 5.2225633 -2.2610654 -2.0449950 -3.8236352 [7] 0.6002209 2.4953138 2.4065555 -1.7038126 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 4 4 3 3 6 1 10 1 7 [2,] 7 2 5 6 4 2 2 5 7 1 [3,] 5 9 9 10 6 10 4 7 6 4 [4,] 10 7 3 2 7 9 9 8 2 3 [5,] 1 1 1 9 2 3 5 3 5 9 [6,] 9 3 2 8 9 5 6 6 9 2 [7,] 3 10 6 4 10 8 8 2 8 5 [8,] 8 8 7 1 1 7 10 9 10 8 [9,] 2 6 10 7 5 4 3 4 4 10 [10,] 4 5 8 5 8 1 7 1 3 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.5215369 -1.8704544 1.4091194 -5.3441076 -3.0336424 1.7949364 [7] -2.4359946 0.6041238 1.6292974 1.9704832 -2.2747822 -0.9493569 [13] 1.6024805 1.9796877 -3.7203760 -0.5665073 0.1486802 1.9841115 [19] -1.2937505 -1.2406924 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6787913 [2,] 0.1548257 [3,] 0.5754497 [4,] 0.6913576 [5,] 0.7786953 > > rowApply(tmp,sum) [1] -3.571651 -14.019252 -2.723463 2.621486 9.607672 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 18 11 16 17 5 [2,] 16 3 13 19 1 [3,] 13 17 10 8 15 [4,] 1 2 3 18 4 [5,] 9 1 1 16 9 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.6913576 0.6403120 0.49629885 -3.3486719 0.05327254 1.3473253 [2,] -0.6787913 -1.6809654 0.07525872 -1.9125917 -2.03110971 -0.6078088 [3,] 0.5754497 0.2433256 0.11858799 -1.2342082 -2.20696844 -1.0628124 [4,] 0.7786953 1.0212838 -0.12776473 1.0099228 0.70186704 1.6174021 [5,] 0.1548257 -2.0944104 0.84673855 0.1414414 0.44929617 0.5008302 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.01128092 -0.18706694 0.6522350 0.8631248 0.5887258 0.09294713 [2,] -1.65715520 -0.03271061 -0.9202168 0.2901488 -1.0782549 -0.78755060 [3,] 0.04661574 0.43960878 -0.3153537 0.1897834 -1.5245117 0.74831480 [4,] -0.39016898 -0.33932403 0.3054315 0.3052195 -0.6523326 -1.16359109 [5,] 0.57599471 0.72361655 1.9072014 0.3222067 0.3915912 0.16052287 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.5601352 0.06111727 -0.4608370 -1.4949874 -1.1228300 0.41911414 [2,] -1.0935459 -1.21603512 -0.8450722 0.5931275 -0.2669998 0.08490432 [3,] 1.7477500 0.88115211 -0.9861928 0.8922675 0.1502846 -0.83497180 [4,] -0.5230787 0.63818060 -0.5578833 0.2183008 0.4973536 0.03100708 [5,] 0.9112199 1.61527287 -0.8703906 -0.7752159 0.8908719 2.28405773 [,19] [,20] [1,] -1.34157780 -1.0703645 [2,] -0.04099485 -0.2128884 [3,] 0.33687337 -0.9284572 [4,] -0.99017886 0.2411440 [5,] 0.74212768 0.7298736 > > > 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.19-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.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 649 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 561 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.19-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 -0.6676995 0.7393984 0.2509851 -0.3939936 -0.655009 -0.4797399 -0.9772393 col8 col9 col10 col11 col12 col13 row1 -0.1754892 -1.829751 -0.07063634 0.02619364 -0.5091775 -0.1676355 col14 col15 col16 col17 col18 col19 col20 row1 0.9149108 1.181722 -0.5291536 -0.901548 -0.09864412 -0.3315927 1.092642 > tmp[,"col10"] col10 row1 -0.07063634 row2 -0.96321493 row3 -0.30677346 row4 -0.11744792 row5 -1.58426319 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.6676995 0.7393984 0.2509851 -0.3939936 -0.6550090 -0.4797399 -0.9772393 row5 0.8585900 1.1191220 0.4593249 0.6487639 -0.4107521 -0.9219997 -0.7650607 col8 col9 col10 col11 col12 col13 row1 -0.1754892 -1.829751 -0.07063634 0.02619364 -0.5091775 -0.1676355 row5 2.4357406 -0.353847 -1.58426319 0.34263227 0.6773516 -0.4065248 col14 col15 col16 col17 col18 col19 row1 0.91491079 1.1817215 -0.5291536 -0.901548 -0.09864412 -0.3315927 row5 -0.09106465 -0.6769843 -0.4220426 -0.963312 -1.01062428 -0.8560792 col20 row1 1.0926421 row5 0.4638794 > tmp[,c("col6","col20")] col6 col20 row1 -0.4797399 1.0926421 row2 -1.2096496 1.2580808 row3 0.2888534 0.6252070 row4 -0.4146441 2.3992116 row5 -0.9219997 0.4638794 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.4797399 1.0926421 row5 -0.9219997 0.4638794 > > > > > 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 50.45849 50.75331 48.3474 50.06751 49.35606 104.5012 50.09127 49.20486 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.8946 48.95831 50.70816 51.05191 49.1355 51.10485 50.79022 51.38563 col17 col18 col19 col20 row1 49.64386 49.62237 48.31123 105.3192 > tmp[,"col10"] col10 row1 48.95831 row2 30.41698 row3 29.82019 row4 31.21791 row5 51.93560 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.45849 50.75331 48.34740 50.06751 49.35606 104.5012 50.09127 49.20486 row5 49.33125 50.81241 49.51262 51.09060 49.88254 104.9801 49.37121 50.40518 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.89460 48.95831 50.70816 51.05191 49.13550 51.10485 50.79022 51.38563 row5 50.49843 51.93560 51.42214 49.18696 50.02139 50.60788 51.04207 49.34602 col17 col18 col19 col20 row1 49.64386 49.62237 48.31123 105.3192 row5 47.58376 50.47915 50.18578 104.5737 > tmp[,c("col6","col20")] col6 col20 row1 104.50119 105.31917 row2 74.60627 74.54493 row3 74.32781 75.86716 row4 73.71883 75.44445 row5 104.98005 104.57371 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.5012 105.3192 row5 104.9801 104.5737 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.5012 105.3192 row5 104.9801 104.5737 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 2.06876682 [2,] -0.15598794 [3,] -3.03009978 [4,] -0.93875993 [5,] 0.06840085 > tmp[,c("col17","col7")] col17 col7 [1,] -0.3243236 -0.9002190 [2,] 1.0015478 -0.7462030 [3,] -0.1817125 -0.7866812 [4,] 0.6454991 -1.6347683 [5,] -0.4459683 -0.9509082 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.1264306 0.20616290 [2,] 1.0126390 0.22560278 [3,] 1.8158916 0.03385136 [4,] -0.2963280 0.73070544 [5,] 1.5665386 -0.53448812 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.1264306 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.1264306 [2,] 1.0126390 > > > > 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] row3 -0.1876415 0.69456513 -1.000618 -0.04799789 -0.2875465 -1.341751 row1 0.6455078 0.04176497 -1.835291 -0.47302300 0.1571399 -1.291899 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.3882909 1.3320668 0.1360087 0.7609870 0.6045881 1.279999 -1.255499 row1 0.9711116 0.1785768 -1.9756379 0.4987786 0.4089700 0.472659 -0.714682 [,14] [,15] [,16] [,17] [,18] [,19] row3 -1.012811 -0.6053497 0.2568781 -0.7586623 -1.0646892 0.5462559 row1 -1.650666 1.3490874 0.1309460 1.6887882 -0.2140736 -1.6411283 [,20] row3 0.02585894 row1 -3.10319427 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.6892174 -0.6074251 0.9257204 0.7308181 0.9894275 2.251508 1.125243 [,8] [,9] [,10] row2 0.6800166 0.3134272 0.03059488 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 2.141383 0.5522776 0.7397866 -1.918373 0.7352339 0.0855127 1.050848 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.02615662 0.5167899 -0.3834515 -0.5834113 1.370456 -0.2556535 1.566833 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6321619 0.1615187 0.1320151 -1.217394 1.582021 1.685433 > > > 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: 0x557e02d37180> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a167518aa" [2] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a6df49862" [3] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a6bda04b6" [4] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a19600259" [5] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a24b05b8" [6] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a6597a0ea" [7] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a22821105" [8] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a5131d43e" [9] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a64fbbb93" [10] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a426993ca" [11] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a23e2f48f" [12] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a2d4e8dfd" [13] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a397f9c9e" [14] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a2ffb3b9e" [15] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd830a5cb2426f" > > > ### 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: 0x557e01239fe0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x557e01239fe0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x557e01239fe0> > rowMedians(tmp) [1] -0.475414602 -0.127663910 -0.143848718 0.277902981 -0.364162376 [6] 0.358388879 -0.437162266 -0.479344264 0.057035194 0.019872339 [11] -0.718649312 0.077856054 -0.339133495 0.471975598 0.264002567 [16] -0.250815440 -0.133109235 -0.008873971 -0.099868232 -0.211731183 [21] -0.303586157 0.527519652 -0.190250645 0.333563386 -0.287155213 [26] 0.099909413 0.598431599 -0.290048763 0.135862449 0.435385765 [31] -0.228470085 0.193020512 -0.146051287 0.747833006 -0.068007892 [36] 0.061875045 -0.291635217 -0.646035313 -0.048302733 0.194597283 [41] 0.019048811 0.123567875 -0.295452978 -0.107607158 -0.004766054 [46] -0.073355559 -0.025037305 0.244712389 0.187403867 -0.118618331 [51] 0.104316618 -0.006132854 -0.021652416 0.298126947 -0.301844953 [56] 0.235799620 0.628336465 0.082023713 0.317462277 0.329291947 [61] 0.097676536 0.185723494 -0.035892895 0.665837171 -0.057989168 [66] -0.468193172 -0.236117932 0.073337008 -0.240379477 -0.105614861 [71] -0.098662216 0.544822515 -0.291132878 0.098075014 0.084330863 [76] 0.294318599 -0.414047436 -0.307701703 -0.666862628 -0.183350173 [81] 0.418787288 -0.277785357 -0.116283607 -0.367972963 -0.221371768 [86] -0.251992842 -0.085473759 0.085597015 -0.004448783 0.289305944 [91] 0.404310726 0.119926177 0.169522641 0.066150481 0.273402822 [96] -0.116552996 0.021287755 0.171263312 -0.013165881 0.607573443 [101] -0.044732196 0.052975697 -0.067457855 -0.350894282 -0.191193986 [106] -0.689007005 -0.703259472 0.107019851 0.192352870 -0.204628512 [111] -0.032123537 0.337991852 -0.227398162 0.267694483 0.249159122 [116] -0.033478740 0.212919899 0.383846870 -0.589580757 -0.122425171 [121] 0.234651044 0.470991804 0.373987342 -0.517244896 -0.634508494 [126] 0.473863358 -0.304674608 -0.225588930 0.321571987 0.052923459 [131] -0.269426945 -0.564270525 0.015052013 -0.055981892 -0.071071534 [136] 0.007737562 0.046485989 -0.077833889 -0.502707223 0.163686173 [141] 0.401872178 0.087737575 -0.470217861 -0.047290182 0.462367755 [146] 0.623479671 -0.216361704 0.438774312 -0.289655728 -0.045294249 [151] 0.070090337 -0.121323677 -0.001552026 0.030479481 -0.244115398 [156] -0.657122991 -0.566214383 -0.256004652 -0.534842411 -0.108721146 [161] -0.044655997 -0.229284186 -0.343134263 0.130162138 0.297999749 [166] 0.277050848 0.037145526 -0.590202255 -0.347473288 -0.298707755 [171] 0.133862108 0.387828057 -0.114786453 0.121527185 0.035611085 [176] -0.339568102 0.170245722 0.281669065 -0.562720653 0.257928738 [181] -0.203157862 -0.296046356 0.162059910 0.370246032 -0.055706003 [186] 0.310143834 0.306604563 0.014983248 0.317812261 -0.158701756 [191] 0.322614515 -0.238327754 0.446289222 0.006253772 -0.175521623 [196] -0.170761776 0.089932514 0.163864560 0.125803092 0.245131516 [201] -0.265831371 0.132033974 0.028544168 0.057159164 -0.298791267 [206] -0.110604866 -0.611921702 -0.078036610 -0.097651178 -0.292382079 [211] 0.116598559 -0.024002385 -0.198738419 0.263890851 0.254800917 [216] 0.489317975 -0.535404292 -0.088484264 0.233142790 -0.170787616 [221] 0.140271314 0.118901458 -0.124437014 -0.610083602 -0.364972589 [226] -0.114605691 -0.256402288 -0.471635997 0.072660644 0.037851141 > > proc.time() user system elapsed 1.419 1.791 3.209
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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: 0x5558e2f47b80> > .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: 0x5558e2f47b80> > .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: 0x5558e2f47b80> > .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: 0x5558e2f47b80> > 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: 0x5558e25bd290> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e25bd290> > .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: 0x5558e25bd290> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e25bd290> > .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: 0x5558e25bd290> > 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: 0x5558e337c1a0> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e337c1a0> > .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: 0x5558e337c1a0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5558e337c1a0> > .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: 0x5558e337c1a0> > > .Call("R_bm_RowMode",P) <pointer: 0x5558e337c1a0> > .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: 0x5558e337c1a0> > > .Call("R_bm_ColMode",P) <pointer: 0x5558e337c1a0> > .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: 0x5558e337c1a0> > 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: 0x5558e2d52440> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5558e2d52440> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e2d52440> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e2d52440> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled91531d084989" "BufferedMatrixFiled91535edc504e" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled91531d084989" "BufferedMatrixFiled91535edc504e" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5558e3183aa0> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e3183aa0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5558e3183aa0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5558e3183aa0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5558e3183aa0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5558e3183aa0> > .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: 0x5558e345afc0> > .Call("R_bm_AddColumn",P) <pointer: 0x5558e345afc0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5558e345afc0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5558e345afc0> > 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: 0x5558e40c7770> > .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: 0x5558e40c7770> > rm(P) > > proc.time() user system elapsed 0.258 0.067 0.316
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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.259 0.049 0.297