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")
Answer from sgibb on Stack Overflow
🌐
GitHub
github.com › ramnathv › rCharts › issues › 718
Could not find function "install_github" · Issue #718 · ramnathv/rCharts · GitHub
October 10, 2016 - require(devtools) Loading required package: devtools Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 租evtools・> install_github('ramnathv/rCharts') Error: could not find function "install_github" Reactions are currently unavailable ·
Author: ramnathv
Discussions

r - install_github: "Error: could not find function myFun" while help(myFun) works. - Stack Overflow
I've written an R package and connected to a private repository in GitHub following the instruction in R packages (Hadley). I can successfully run the functions and visualise the help pages of the More on stackoverflow.com
🌐 stackoverflow.com
error in "install_github("vqv/ggbiplot""
Hello, I'm trying to install ggbiplot through "github". But I'm getting the following error: Any thoughts on how I can resolve the issue? > install_github("vqv/ggbiplot") Error in install_github("vqv/ggbiplot") : could not find function "install_github" Thanks More on forum.posit.co
🌐 forum.posit.co
1
0
April 15, 2020
Trying to install a package I made , but I get the "package is not available for this version of R" error.
If your GitHub repository is "ace" and your package is "wonder", install with remotes::install_github("ace/wonder"). The function you're using is not for GitHub packages. Also, you need to have the build tools to install that package, especially if you're on Windows. More on reddit.com
🌐 r/RStudio
5
1
December 12, 2021
r - rnaturalearthhires package installation error - Stack Overflow
I am trying to install the rnaturalearthhires package but I am getting many errors. Here is the first error: Installing the rnaturalearthhires package. Installing package into ‘C:/Users/kkost/OneDr... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Introduction to R
intro2r.com › packages.html
1.5 R packages | An Introduction to R
If you try to use a function without first loading the relevant R package you will receive an error message that R could not find the function. For example, if you try to use the install_github() function without loading the remotes package first you will receive the following error.
🌐
RDocumentation
rdocumentation.org › packages › devtools › versions › 1.13.6 › topics › install_github
install_github function - RDocumentation
This function is vectorised on repo so you can install multiple packages in a single command. install_github(repo, username = NULL, ref = "master", subdir = NULL, auth_token = github_pat(quiet), host = "https://api.github.com", quiet = FALSE, ...)
🌐
Stack Overflow
stackoverflow.com › questions › 40668174 › install-github-error-could-not-find-function-myfun-while-helpmyfun-works
r - install_github: "Error: could not find function myFun" while help(myFun) works. - Stack Overflow
error: could not find function install_github for R version 2.15.2 · 8 · devtools::install_github Error in function (type, msg, asError = TRUE) : <not set> 13 · Problems installing r package via devtools install_github · 4 · Why do I get a syntax error in devtools::install_github?
🌐
Awscd
awscd.com › ErrorMessage › Github › cannot-find-function-install_github.html
Github cannot find function install_github
Error Message(English): cannot find function install_github · error: could not find function install_github for R version 2.15.2 ...
🌐
Google Groups
groups.google.com › g › camtrapr › c › m7UA3nPJp24
Error in 'install_github("jniedballa/camtrapR"
install_github("jniedballa/camtrapR") probably didn't work because the required package (devtools) was not loaded first.
Find elsewhere
🌐
Bioconductor
support.bioconductor.org › p › 123696
Can't install TopmedPipeline Package
August 12, 2019 - With BiocManager I got this error message: Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26) Installing github package(s) 'remotes UW-GAC/analysis_pipeline/TopmedPipeline/' Error: Failed to install 'unknown package' from GitHub: attempt to set an attribute on NULL · With devtools I got his error message: Error in installgithub("UW-GAC/analysispipeline/TopmedPipeline/") : could not find function "install_github"
🌐
Rdrr.io
rdrr.io › cran › remotes › man › install_github.html
install_github: Attempts to install a package directly from GitHub. in remotes: R Package Installation from Remote Repositories, Including 'GitHub'
May 29, 2024 - rdrr.io Find an R package R language docs Run R in your browser ... Browse all... ... This function is vectorised on repo so you can install multiple packages in a single command. install_github( repo, ref = "HEAD", subdir = NULL, auth_token = github_pat(quiet), host = "api.github.com", dependencies = NA, upgrade = c("default", "ask", "always", "never"), force = FALSE, quiet = FALSE, build = TRUE, build_opts = c("--no-resave-data", "--no-manual", "--no-build-vignettes"), build_manual = FALSE, build_vignettes = FALSE, repos = getOption("repos"), type = getOption("pkgType"), ...
🌐
OHDSI
forums.ohdsi.org › implementers
R: could not find functions after installing modules - Implementers - OHDSI Forums
October 4, 2021 - After configuring the proxy and changing the download file method to “libcurl” (the only one that works), packages from github seem to install with no errors. In particular, after installing DatabaseConnector using devtools::install_github(‘OHDSI/DatabaseConnector’) no errors are shown ...
🌐
Posit Community
forum.posit.co › package development
'could not find function' error even though fun is in NAMESPACE and has an .Rd file - Package development - Posit Community
December 18, 2020 - I documented in using devtools and roxygen2. Then I installed the package using devtools::install_github() and loaded it with library(); then I attempted to use functions from the package. Most of the functions worked, but for just one of the functions, I'm getting the error "could not find function".
🌐
Reddit
reddit.com › r/rstats › please help. package installation is preventing me from reading .csv data.
r/rstats on Reddit: Please help. Package installation is preventing me from reading .csv data.
September 9, 2022 -

EDIT: ISSUE HAS BEEN RESOLVED

I have been interested in doing some principal component analysis on a dataset; so I did install.packages("devtools") in order to plot the PCA using "ggbiplot". However, I get an error message with trying to do library(devtools) and install.packages("ggbiplot").

> library(devtools)
Loading required package: usethis
Error: package or namespace load failed for ‘devtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘cli’ 3.2.0 is already loaded, but >= 3.3.0 is required
> install_github("vqv/ggbiplot")
Error in install_github("vqv/ggbiplot") : 
  could not find function "install_github"

So I thought "oh well", I'll work on that later, let me just see if I can actually do PCA analysis on my data. So I try to read in the .csv file with my variables and I get this error:

> vascdata <- read_csv("PCATest_Vasc.csv")
Warning in base::nchar(wide_chars$test, type = "width") :
  restarting interrupted promise evaluation
Warning in base::nchar(wide_chars$test, type = "width") :
  internal error -3 in R_decompress1
Error in base::nchar(wide_chars$test, type = "width") : 
  lazy-load database '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/cli/R/sysdata.rdb' is corrupt

I don't know what to do. I see that it seems to be this "cli" that is causing the issue. Thinking I should remove.packages("devtools")? Or remove.packages("cli") whatever that is, before reinstalling? I'm at a loss of what to do, and admittedly panicking a little.

🌐
Blogger
hrcode11.blogspot.com › 2011 › 08 › linux-error-could-not-find-function.html
linux - error: could not find function install_github for R version 2.15.2 -
November 18, 2017 - install_github function of devtools package. have install , load devtools before using install_github: install.packages("devtools") library("devtools") install_github("youruser/yourrepo") ... i using matlab r2013b. using gui, command windows , editor in split screen. in matlab preferences > editor/debugger > editor. there option set custom editor instead of matlab editor. set local editor /usr/bin/vim , not able open files @ anymore.
🌐
GitHub
github.com › r-lib › devtools › issues › 1692
Error when using install_github() · Issue #1692 · r-lib/devtools · GitHub
January 16, 2018 - Hi, I just finished crating a mock package for the course Building R Packages. The package passed travis and appveyor. But when i tried to download it I get the following errors: install_github(&qu...
Author: r-lib
🌐
Posit Community
forum.posit.co › general
I can't install packages using install_github() in R - General - Posit Community
April 6, 2023 - Whenever I try to install a package using devtools:install_github() in RStudio, I always get the following error Error: ERROR: no permission to install to directory..... Example: I tried installing abbrevTexts package from github because it isn't on CRAN devtools::install_github(repo = 'GitHub - edvardoss/abbrevTexts: Functions that will make life less sad when working with abbreviated text for multiclassification tasks') install_github(repo = 'https://github.com/edvardoss/abbrevTexts') Do...
🌐
Stack Overflow
stackoverflow.com › questions › 59831760 › r-cannot-use-functions-after-install-github
package - R: cannot use functions after install_github - Stack Overflow
The sva package is not installed. Was there an error message when you ran the install_github function? ... Damn. Sometimes all one needs is to just know that things are really supposed to work. I just tried installing it again with the same command and now library('sva') works. Can't see anymore that went wrong in the previous install because I had a bunch of other output since ... Find the answer to your question by asking.