I am working with a Rstudio installed on a Centos server. The default gcc is version 4.4.7 but the lubridate package needs a higher version. I now have one installed but Rstudio still is pointing to the old one. When I run
system2("gcc", "--version") in the console I get
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
But when I runR in the Rstudio terminal and then enter the system2 code I get
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
How do I change the gcc that Rstudio uses when it compiles packages?