Initial commit of .R and cookbook