I am trying to load packages in Rstdio. When I use the command line to load packages "R -e "library('XXXXX')"
, or Run the command library(XXXXX) in Rstdio console
, I am able to load the package.
But when I try to run a .R file that laods the same package from a .sh file, I get the following error
Error in library("XXXXX") : there is no package called ‘XXXXXX’
I am running the code in an EC2 instance
Can anyone please help with the error