Defines functions ld

Documented in ld

ld <- function(x, y=NULL, depth=NULL, stats, symmetric=FALSE) {
  if (missing(stats))
    stop("LD stats must be specified")
  cstats <- c("LLR", "OR", "Q", "Covar", "D.prime", "R.squared", "R")%in%stats
  if (!any(cstats))
    stop("nothing to calculate")
  if (is.null(y)) {
    if (is.null(depth))
      stop("depth argument must be supplied")
    dmax <- ncol(x)-1
    if (depth>dmax) {
      depth <- as.integer(dmax)
      warning("depth too large; it has been reset to ", dmax)
  .Call("ld", x, y, as.integer(depth), cstats, symmetric, PACKAGE="snpStats");

Try the snpStats package in your browser

Any scripts or data that you put into this service are public.

snpStats documentation built on May 2, 2018, 4:18 a.m.