I have an AWS (Amazon Web Services) virtual machine, and it is a Windows machine. I downloaded R and installed (R-2.7.2-win32). When I tried to install a CRAN package,
install.packages("rcdk")
I always got massage like:
“Warning: unable to access index for repository https://cloud.r-project.org/bin/windows/contrib/2.7”
I guess the AWS server restricted R accessing the internet. I went to firewall “Allow an app or feature through Windows Firewall”, and I allowed “R for Windows front-end” to access Private and Public firewall. It did not solve the problem.
How can I configure AWS windows, so R can install packages?
I guess the AWS server restricted R accessing the internet
Absolutely not: AWS does not filter such resources.
Your problem is simply that https://cloud.r-project.org/bin/windows/contrib only contains versions 2.13, 2.14, 2.15, 2.16, 3.0, 3.1, 3.2, 3.4 and 3.5.
So, you have 2 solutions:
either change your remote repository witch such an utility as install.packages
to point to an old repository that could contain an archive of the 2.7 version (see https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Setting-up-a-package-repository)
or, easier, remove your relatively old R-2.7.2-win32 and install something more recent, at least version 2.13, on your Windows host at AWS.