R

Run R script on HPC

Run R on HPC Load R from module Install packages Run R script with arguments in command line Run R in batch mode Node, core, and other jargons Submit the batch job Pipeline I was trying to run simulation about my migration project on Yale HPC (high performance cluster). After spending a day working on how to do it, I think it’s probably a good time to take a note and dust off my website.

Generalized Birthday Problem: Rcpp

Rcpp Generalized birthday problem GeneralBirthdayProblem package In the previous post, I tried to use some algorithms to speed up simulation. Now in this post, I will introduce a pretty powerful package Rcpp, which has the potential to fundementally change the way you do simulation if you want to employ a time-consuming simulation in R. Let’s finish this project! Rcpp Generalized birthday problem GeneralBirthdayProblem Package

Generalized Birthday Problem

What’s probability of one birthday shared by two persons in any size of room? Binary search Replicate size This tiny project comes from the coding class I am taking this semester. The simplest birthday problem is as followed: how many people should be in a room such that the probability of a birthday shared by at least two persons is just above 0.5? I found this problem is very interesting.

New website!

New website!