I am working in an airgapped environment where there is no internet.
I have a folder full of tar.gz files which I would like to install
Though all the dependencies of a package are also available, am not sure how to code them using R to identify the dependency and install them.
Currently am doing like below
install.packages("/home/user/packages/sys_3.4.tar.gz, repos = NULL, type = " source")
install.packages("/home/user/packages/askpass_1.1.tar.gz, repos = NULL, type = " source")
However, I was able to write above code because I tried installing 'askpass' first and it threw an error for missing dependency 'sys'. So, I am manually doing one by one.
Can experts here help me on how can I automate this using a for loop?
Mostly, the dependencies are present in the folder. If dependencies are present, it should search and install them before throwing an error.
I will not be able to do this manually for 200 folders/packages. So, can you help me?