You are on page 1of 5

4/1/23, 10:45 Search results

GV903-7-FY : Advanced Research Methods


Dashboard / My courses / GV903-7-__-CO-__-__ / Search / Search results

 mnlogit 

Advanced search...
Forums
Search results: 8
Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Philip Leifeld - Tuesday, 8 February 2022, 10:47 PM

MacOS often causes extra trouble for installing or compiling packages.

R is fairly slow on its own. But heavy computations may require a fast language. R packages often accomplish this by
including C, C++ or Fortran code in the package and linking to this faster code from the R code. When you install a
package from CRAN, this is not a problem because the package is usually pre-compiled for MacOS. But if you install a
source package, you need to compile the sources on your Mac to make them work. Unfortunately, MacOS does not
come with a compiler (usually gcc) by default. That's why your error message complains that the code couldn't be
compiled and that gcc could not be found. You usually have to install a software called xcode on MacOS, which
includes compilers like gcc. Can you try it and see if that solves your problem?
Permalink Show parent Reply

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Cecilia Cavero Sanchez - Tuesday, 8 February 2022, 8:43 PM

Hi Joelle,

Thanks so much for the feedback! Unfortunately, I think that fix is only available for Windows, and I work from a
MacOs. Thanks for your help anyway!

Cecilia
Permalink Show parent Reply Export to portfolio

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Joelle Tasker - Tuesday, 8 February 2022, 2:55 PM

Hi Cecilia,

I had an issue installing as a package archive file at first, and seem to have fixed it by installing rtools following the
instructions here: https://cran.r-project.org/bin/windows/Rtools/rtools40.html and then after re-starting R I was able to
install mnlogit as a package archive file without errors. I'm not sure if this is the most straightforward solution but it
seems to have worked for me so perhaps it will work for you too? My error was slightly different to yours also so not
sure if it will fix your error but might be worth trying.

Thanks,
Joelle
Permalink Show parent Reply

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Cecilia Cavero Sanchez - Tuesday, 8 February 2022, 1:46 PM

https://moodlearchive.essex.ac.uk/2021/mod/forum/search.php?id=2334&search=mnlogit 1/5
4/1/23, 10:45 Search results

Hi,

I tried both downloading the .tar.gz and installing it as a package archive file and via the remotes::install_github()
function. Both methods give me the same error (attached below). I was wondering if anyone knew how to fix it.

Thanks!

Cecilia


Permalink Show parent Reply Export to portfolio

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Hal Meakin - Tuesday, 8 February 2022, 12:34 AM

Many thanks for this clarification.

Downloading the .tar.gz and installing that as a package archive file seems to have worked exactly as intended. All the
functions work as expected.

The remotes::install_github() function seemed to spend a lot of time downloading something, but ultimately threw an
error.

Many thanks again


Permalink Show parent Reply

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Philip Leifeld - Monday, 7 February 2022, 11:13 PM

CRAN is the official repository that hosts all R packages. Over the years, they have imposed increasingly stricter
requirements on package authors. For example, a common problem is that a package A relies on the functionality o
other packages B, and if those other packages B are changed, that may break the functionality in the package that
depends on them, package A. If package A is then not updated to make it work again with the updated packages B,
will display some error on CRAN. The CRAN maintainers don't like this and ask the maintainer of package A to fix an
bugs or else the package will be removed from CRAN. With academics being notoriously busy, that is unfortunately
what sometimes happens if maintainers do not constantly respond to such demands. That's probably why the packa
was removed some time ago.

If you look at the CRAN page Hal referenced, you will see a link to the package archive. You can download version
1.2.6 of the mnlogit package there as a source file (with extension .tar.gz). In RStudio, you can install such source file
directly if you click on "Install" and then select "Package archive file" under "Install from". You can select the
downloaded .tar.gz file there. If you are lucky, this will work because the other packages on your system already hav
the right version as required by mnlogit 1.2.6. You can alternatively do the same thing by typing the following
command on your operating system's command line or terminal (not the R console!) from the directory where you
saved the file: R CMD INSTALL mnlogit_1.2.6.tar.gz.

https://moodlearchive.essex.ac.uk/2021/mod/forum/search.php?id=2334&search=mnlogit 2/5
4/1/23, 10:45 Search results

If it does not work that way, then I would suggest installing it from GitHub, where CRAN deposits a copy of the
package. You can use the install_github function from the remotes package for this purpose. Something like this mig
do the trick: remotes::install_github("cran/mnlogit"). This should install the right package dependency versions as we

Please keep everyone posted here about which of these things worked for you, if any.
Permalink Show parent Rep

See this post in context

Module Forum -> Installing the 'mnlogit' package -> Re: Installing the 'mnlogit' package
by Cecilia Cavero Sanchez - Monday, 7 February 2022, 5:34 PM

Hi Hal,

I am having the same issue you do, I have also been unable to download the mnlogit package (even when
downloading the outdated version, RStudio gives me an error and does not install it). I would find some clarification
regarding this helpful as well.

Thanks!

Cecilia
Permalink Show parent Reply Export to portfolio

See this post in context

Module Forum -> Installing the 'mnlogit' package


by Hal Meakin - Monday, 7 February 2022, 4:33 PM

Hello all, 

Has anyone else been having trouble installing and using the mnlogit package on R?

Below is a screenshot of my console when I try to run the 'install.packages()' function, and it says that mnlogit is not
available for my version of R. 

I've also found a CRAN article saying that the package was removed back in October 2021, however I can still find th
(read-only) documentation on GitHub. 

I'm just trying to understand if it's just an issue with my machine, or if the CRAN post is correct in that it's not availa
anymore... If this is true, then should installing it with the devtools', 'install_github()' function circumvent this problem

https://moodlearchive.essex.ac.uk/2021/mod/forum/search.php?id=2334&search=mnlogit 3/5
4/1/23, 10:45 Search results

Best, Hal

https://moodlearchive.essex.ac.uk/2021/mod/forum/search.php?id=2334&search=mnlogit 4/5
4/1/23, 10:45 Search results

My courses
My modules
Search
All courses
Archive
2018-19
2019-20
2020-21
Quick Links
FASER
Listen Again
Open Essex
LEAP
Reading Lists
CareerHub
Library Website
Help
Students
Staff

You are logged in as Cecilia Cavero Sanchez (Log out)


 GV903-7-__-CO-__-__

Need help?
Contact the IT Helpdesk
Moodle for course owners
Leave theme feedback

Accessibility

Quick Links
FASER
Listen Again
My Essex
Moodle Archive
Open Essex
LEAP
CareerHub

Data retention summary


Get the mobile app

https://moodlearchive.essex.ac.uk/2021/mod/forum/search.php?id=2334&search=mnlogit 5/5

You might also like