Some fixes to the var creation and add R-to-LaTeX