10 Installing epmr
A lot of the examples I’m using in the class require the epmr
package. In theory, it should be really easy to install, using the following code.
# Will install devtools if not already installed
if (!require("devtools")) install.packages("devtools")
::install_github("talbano/epmr") devtools
It will install devtools, if you don’t have it already and then compile the current version of the package for you. However, if your computer doesn’t already have a compiler, you might have some trouble.
If you have trouble installing the epmr
package, you are not alone. I, Prof. Mason, am working on resolving the issue. To install epmr
package directly from github, you need devtools
and a working development environment (a.k.a. an R friendly compiler). The specific compiler will depend on your operating system.
- Windows: Install Rtools.
- Mac: Install Xcode from the Mac App Store.
- Linux: Install a compiler and various development libraries (details vary across different flavors of Linux).
Try installing the compiler that corresponds to your operating system. And then try installing directly from github again.
# Will install devtools if not already installed
if (!require("devtools")) install.packages("devtools")
::install_github("talbano/epmr") devtools
If the compilation doesn’t work, don’t despair! I’ve compiled a version that should work. First download this file “epmr_0.0.0.9000.tar.gz” from github, and place it in your working directory. (Here is the direct download link:)
Then, install that package directly, using this code.
install.packages("epmr_0.0.0.9000.tar.gz", repos = NULL, type = "source")
If that doesn’t work, please try using the Rstudio GUI, as illustrated below.
- Open the
tools
dropdown menu, and clickInstall Packages
- Then change the install from setting to
Install from package archive
- Then select browse for file and locate the archive “epmr_0.0.0.9000.tar.gz”
- Then select that archive, and you should see something like the image below
- Press Install. This action should begin the installation process. If you still cannot get the package to install, please let me know as soon as possible. That way, I can help you during regular business hours. (In other words, don’t wait until the last minute)