Skip to content

Instantly share code, notes, and snippets.

View sjvrensburg's full-sized avatar

Stefan Janse van Rensburg sjvrensburg

View GitHub Profile
@alexg9010
alexg9010 / how_to_debug_rcpp.Rmd
Created October 23, 2017 09:36
How to debug Rcpp code in a package
---
title: "How to debug Rcpp code in a package"
output: html_document
author: Alexander Gosdschan
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@slowkow
slowkow / gg_qqplot.R
Last active February 20, 2024 19:44
Create a Q-Q plot with ggplot2
#' Create a quantile-quantile plot with ggplot2.
#'
#' Assumptions:
#' - Expected P values are uniformly distributed.
#' - Confidence intervals assume independence between tests.
#' We expect deviations past the confidence intervals if the tests are
#' not independent.
#' For example, in a genome-wide association study, the genotype at any
#' position is correlated to nearby positions. Tests of nearby genotypes
#' will result in similar test statistics.