Posts

R Basics

2020-07-05 Laura Vairus, others
𝕊wirl is a great and easy way to get you started with R. Install and open it by clicking the green arrow on the right. Install Swirl Package: install.packages("swirl") library("swirl") swirl() Once you enter your username, it prompts you to choose a course to install. Choose 1 … Read more →

Command Line Basics

2020-07-02 Laura Vairus
𝕙ttps://www.nature.com/articles/d41586-021-00263-0 […] In this tutorial, we will learn some basic Unix/Linux commands to perform tasks in the command line. The command line is an interface that allows you to store, manage, and process data. Terminal is an app that gives you access to the … Read more →

L8 GRM shows population structure

2020-02-06 R package build
𝕝ibrary(tidyverse) work.dir ="~/Downloads/hapmap/" functions tileplot <- function(mat) { mat = data.frame(mat) mat$Var1 = factor(rownames(mat), levels=rownames(mat)) ## preserve rowname order melted_mat <- gather(mat,key=Var2,value=value,-Var1) melted_mat$Var2 = … Read more →

L1 Binomial Parameter Posterior

2020-01-06 R package build
𝕦nnorm_posterior = function(theta) {theta^y * (1 - theta)^(n-y)} n = 10 y = rbinom(1,n,0.6) curve(unnorm_posterior,from = 0,to = 1, main=paste("n = ",n,"; y = ",y)) n = 100 y = rbinom(1,n,0.6) curve(unnorm_posterior,from = 0,to = 1, main=paste("n = ",n,"; y = … Read more →