Compiling old code into ComGenR.R