symDMatrix-package: A Package Providing Symmetric Matrices Partitioned into...

Description Example Dataset See Also

Description

A Package Providing Symmetric Matrices Partitioned into File-Backed Blocks.

Example Dataset

The example dataset in the extdata folder is the G matrix of the dummy dataset that comes with the BEDMatrix package. It has been generated as follows:

1
2
3
4
library(BGData)
X <- BEDMatrix(system.file("extdata", "example.bed", package = "BEDMatrix"))
G <- getG_symDMatrix(X, blockSize = 17, folderOut = "inst/extdata")
    

To load the dataset:

1
2
load.symDMatrix(system.file("extdata", "G.RData", package = "symDMatrix"),
    readonly = TRUE)

To demonstrate the as.symDMatrix method for character vectors, RData files for each block have been generated:

1
2
3
4
5
6
7
for (i in 1:nBlocks(G)) {
    for (j in i:nBlocks(G)) {
        block <- G[[i]][[j]]
        save(block, file = paste0("inst/extdata/data_", i, "_", j, ".RData"))
    }
}
    

See Also

symDMatrix-class for the symDMatrix class. BEDMatrix-package for more information on the BEDMatrix package.


QuantGen/symDMatrix documentation built on Aug. 7, 2020, 10:17 p.m.