Install R Package Directly From GitHub

Deepanshu Bhalla 3 Comments
In R, you can install packages directly from Github with simple 2-3 line of codes.

Step I : Install and load devtools package
install.packages("devtools")
library(devtools)
Step II : Install Package from GitHub
install_github("tomasgreif/woe")
Possible Errors while installing package from GitHub 

I.  Error : Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘stringi’

Solution : Run "install.packages("stringi")" before running install_github command

II.  Error : Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached

Solution :  Step 1. Update configuration for your proxy in the code below -

library(httr)
set_config(use_proxy(url="proxy.xxxx.com", port=80, username="user",password="password"))

How to find proxy server settings :
Start>control panel>Network and Internet > click on Internet Options > click on connections tab then right at the bottom click on LAN settings > Check Proxy Server Settings
Step 2.  Run this command - install_github("tomasgreif/woe")

Important Note : If you want to build R package, you need to install Rtools along with devtools package. Rtools is not a package but an executable file.

You can download Rtools from this link - https://cran.r-project.org/bin/windows/Rtools/ . OR
install.packages('installr')
install.Rtools()
Related Posts
Spread the Word!
Share
About Author:
Deepanshu Bhalla

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 10 years of experience in data science. During his tenure, he worked with global clients in various domains like Banking, Insurance, Private Equity, Telecom and HR.

3 Responses to "Install R Package Directly From GitHub"
  1. EXCELLENT! YOU HAVE SAVED ME!
    Thank you so much, I needed it to begin an online course.

    ReplyDelete
  2. I'm trying to install the TStools package and I get this error mesage

    Error in curl::curl_fetch_disk(url, x$path, handle = handle) :
    Problem with the SSL CA cert (path? access rights?)

    how can I fix it?

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
Next → ← Prev