I would recommend using a standalone R version and RStudio to manage it. And you should check your versions of RServe and Cairo package: