Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

Installing when R is run from a remote desktop

Ask questions about installing Apollo, running it inside a shell, and updating to new versions. Please make sure you provide information about which version of Apollo and R you are using.
Post Reply
sjtan123
Posts: 3
Joined: 29 Jun 2020, 19:27

Installing when R is run from a remote desktop

Post 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!
dpalma
Posts: 190
Joined: 24 Apr 2020, 17:54

Re: Installing when R is run from a remote desktop

Post 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
sjtan123
Posts: 3
Joined: 29 Jun 2020, 19:27

Re: Installing when R is run from a remote desktop

Post 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
dpalma
Posts: 190
Joined: 24 Apr 2020, 17:54

Re: Installing when R is run from a remote desktop

Post 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
sjtan123
Posts: 3
Joined: 29 Jun 2020, 19:27

Re: Installing when R is run from a remote desktop

Post 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.
Victor
Posts: 1
Joined: 17 Jul 2020, 17:07

Re: Installing when R is run from a remote desktop

Post 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.
Post Reply