Create rd_func.r

Functions for regression discontinuity analysis in R.