Page 1 of 1

Installing when R is run from a remote desktop

Posted: 29 Jun 2020, 19:43
by sjtan123
Hi all,

I am having trouble installing and using Apollo. I work at an organization where R is opened using a remote application (not shared folder; I access the applications by signing into the remote computer via a web link). My working directory on the other hand is in a shared folder.

I think my issue must be related to this guidance from the website:
Often computers from big organisations will install R packages in shared libraries (that is in folders in the private company network). R does not like its libraries to be in shared folders. As a general recommendation, always install packages in local libraries, i.e. in a folder in the local hard drive. You can see your active libraries by typing .libPaths(). This will list the active libraries. If the local library is, for example, the second one in the list, you should keep only that one by typing .libPaths(.libPaths()[2]). Then you should try installing Apollo again.
I have tried typing in .libPaths() and get the following result:

[1] "C:/Users/my.username/Documents/R/win-library/3.6"
[2] "C:/Program Files/R/R-3.6.2/library"

Both these libraries are on my local computer.

Can anyone please advise how to install Apollo in this situation? Thank you!

Thank you!

Re: Installing when R is run from a remote desktop

Posted: 30 Jun 2020, 10:24
by dpalma
Hi,

I am afraid we don't have much experience with a set-up such as yours, but we'll try to help the best we can.

I would recommend starting by trying to install Apollo the regular way, that is typing:

Code: Select all

install.packages("apollo")
If you do that, do you get en error message? if so, what error?

Cheers
David

Re: Installing when R is run from a remote desktop

Posted: 30 Jun 2020, 16:42
by sjtan123
Thanks I really appreciate it!

When I try to install Apollo the normal way I get the following message:

Code: Select all

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/my.username/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘mnormt’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/apollo_0.1.0.zip'
Content type 'application/zip' length 1546870 bytes (1.5 MB)
downloaded 1.5 MB

package ‘apollo’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\my.username\AppData\Local\Temp\3\RtmpqYmLuf\downloaded_packages
And when I try to load the Apollo library afterward, I get this message:

Code: Select all

Error: package or namespace load failed for ‘apollo’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘mnormt’
In addition: Warning message:
package ‘apollo’ was built under R version 3.6.3

Re: Installing when R is run from a remote desktop

Posted: 30 Jun 2020, 16:55
by dpalma
Hi,

Apollo depends on multiple other packages to work. Among them, it depends on the package 'mnormt'. So for Apollo to work, mnormt must be installed. The issue is that the package mnormt requires R version 4 or later to work, but your system only has R version 3.6. As your R version is old, mnormt cannot be installed, and therefore neither can Apollo.

I'm afraid the only solution here is to update your R installation to the latest version (4.0.2 at the time of writing) and try to install Apollo again. If you don't have administrative rights over the R installation, maybe you can ask IT people from your organisation to do it for you.

Sorry we cannot be of more help.

David

Re: Installing when R is run from a remote desktop

Posted: 30 Jun 2020, 17:19
by sjtan123
Thank you so much! I will see if they are able to upgrade to the latest version of R and hope that resolves the issue.

Re: Installing when R is run from a remote desktop

Posted: 17 Jul 2020, 17:14
by Victor
I had a similar issue using a remote server with R v3.6.0. In order to avoid the process of contacting IT to update R, I installed old versions of the packages quantreg (v5.38), MCMCpack (v1.4-4), RSGHB v(1.2.1) and mnormt (1.5-5) from sources.