data(testdata)
snps20.20 <- Autosomes[11:20,11:20]
obj.snp.dprime <- ld.snp(snps20.20)
class(obj.snp.dprime)
summary(obj.snp.dprime)
## Not run:
# # The following isn't executable-as-is example, so these illustrations
# # are commented out to stop R CMD check from complaining:
#
# > d<- ld.snp(all, 3, 10, 15)
# rows = 48, cols = 132
# ... Done
# > d
# $dprime
# [,1] [,2] [,3]
# [1,] 1 1 1
# [2,] 1 1 1
# [3,] 1 1 1
# [4,] 1 1 0
# [5,] 1 0 0
#
# $rsq2
# [,1] [,2] [,3]
# [1,] 1.0000000 0.9323467 1.0000000
# [2,] 0.9285714 1.0000000 0.1540670
# [3,] 0.9357278 0.1854481 0.9357278
# [4,] 0.1694915 1.0000000 0.0000000
# [5,] 0.1694915 0.0000000 0.0000000
#
# $lod
# [,1] [,2] [,3]
# [1,] 16.793677 11.909686 16.407120
# [2,] 10.625650 15.117962 2.042668
# [3,] 12.589586 2.144780 12.589586
# [4,] 2.706318 16.781859 0.000000
# [5,] 2.706318 0.000000 0.000000
#
# attr(,"class")
# [1] "snp.dprime"
# attr(,"snp.names")
# [1] "dil118" "dil119" "dil5904" "dil121" "dil5905" "dil5906"
#
# ## End(Not run)
Run the code above in your browser using DataLab