Skip to content

Instantly share code, notes, and snippets.

@kindlychung
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kindlychung/757f816f5b2f9e8d36b8 to your computer and use it in GitHub Desktop.
Save kindlychung/757f816f5b2f9e8d36b8 to your computer and use it in GitHub Desktop.
collr2 documentation details
#' These functions take a genotype matrix and generate a collapsed genotype matrix
#' by shifting. For example:
#' ```
#' a b c
#' d e f
#' g h i
#'
#' # Shift by 1
#' b c NA
#' e f NA
#' h i NA
#'
#' # Combine these two
#' a+b b+c NA
#' d+e e+f NA
#' g+h h+i NA
#' ```
For example, this
1 1 1
2 2 2
3 3 3
4 4 4
becomes:
1 2 3
2 3 4
3 4 NA
4 NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment