Given an ldLoaderSpec (from ldLoader) and a block index
g, load the corresponding LD correlation matrix (or the genotype
matrix, in region mode with returnGenotype = TRUE).
Arguments
- spec
An
ldLoaderSpecobject returned byldLoader.- g
Integer block index (1-based).
Examples
spec <- ldLoader(rList = list(diag(10), diag(15)))
loadLdBlock(spec, 1)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> [1,] 1 0 0 0 0 0 0 0 0 0
#> [2,] 0 1 0 0 0 0 0 0 0 0
#> [3,] 0 0 1 0 0 0 0 0 0 0
#> [4,] 0 0 0 1 0 0 0 0 0 0
#> [5,] 0 0 0 0 1 0 0 0 0 0
#> [6,] 0 0 0 0 0 1 0 0 0 0
#> [7,] 0 0 0 0 0 0 1 0 0 0
#> [8,] 0 0 0 0 0 0 0 1 0 0
#> [9,] 0 0 0 0 0 0 0 0 1 0
#> [10,] 0 0 0 0 0 0 0 0 0 1