Skip to content

Instantly share code, notes, and snippets.

@allanjust
allanjust / datasaurus.R
Last active May 4, 2017 01:45 — forked from ramnathv/datasaurus.R
Datasaurus in R
library(ggplot2)
library(datasauRus)
library(gganimate)
p <- ggplot(datasaurus_dozen, aes(x = x, y = y, frame = dataset)) +
geom_point() +
theme(legend.position = "none")
gg_animate(p, title_frame = FALSE)
@allanjust
allanjust / celltype_from_ewastools.R
Created December 2, 2022 21:09
Estimate cell composition in a public 450k sample using ewastools and the HRS coefficients
# demo using the ewastools package to estimate leukocyte composition from a public 450k sample
# using results learned from HRS (see preprint https://www.biorxiv.org/content/10.1101/2022.11.28.518190v1.full)
if("ewastools" %in% rownames(installed.packages()) == FALSE){
install.packages("BiocManager")
BiocManager::install("illuminaio")
remotes::install_github("hhhh5/ewastools") # at least v1.7.1
}
library(ewastools)