Initial commit of R structure

Porta C code is included, but still has LOTS of inappropriate code for
R packages (writing to log files, etc)