Use R only if CDAT_BUILD_GUI is ON