error: could not find function install_github for R version 2.15.2

I'm having multiple problems with R right now but I want to start asking one of the most fundamental questions.

I want to install GitHub files into R, but for some reason the install_github function doesn't seem to exist. For example, when I type:

install_github("devtools")

I get

error: could not find function install_github

The install_packages function worked perfectly fine. How can I solve this problem?

To add, I want to ask whether there is a way to upgrade R, since version 2.15.2 doesn't seem to be compatible for most of the packages I want to work with.

I'm currently using Linux version 3.6.11-1 RedHat 4.7.2-2 fedora linux 17.0 x86-64.

I checked the CRAN website but they seemed to have the most unupdated versions of R (if that is even possible) that dates all the way back to '09. I would seriously love to update myself from this old version of R. Any advice on this too?

2 Answers

install_github is a function of the devtools package. You have to install and load devtools before using install_github:

install.packages("devtools")
library("devtools")
install_github("youruser/yourrepo")
8

Upgrading the R and R studio version will help.And then you need to install devtools before using install_github.

HOW TO UPGRADE R

# Update and Install
sudo apt-get update
sudo apt-get install r-base r-base-dev
#
# To update any R libraries installed via APT.
#
sudo apt-get upgrade

THEN INSTALL DEVTOOLS IN ORDER TO USE install_github()

install.packages("devtools")
library(devtools)
/* then */
install_github("your_package_name")

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like