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 Overflowinstall_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")
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")
r - install_github: "Error: could not find function myFun" while help(myFun) works. - Stack Overflow
error in "install_github("vqv/ggbiplot""
Trying to install a package I made , but I get the "package is not available for this version of R" error.
r - rnaturalearthhires package installation error - Stack Overflow
I had to make a package for school.
I linked it with my GitHub account and I want to see if I can install what I've made. When I try install.packages("package"), I get the error.
Why would this error occur? I'm using the latest version RStudio-2021.09.1-372
Any help would be appreciated! Thank you!
I found this isssue, it might help: https://github.com/ropensci/rnaturalearthhires/issues/2
install.packages("devtools") # I guess you also need this
devtools::install_github("ropensci/rnaturalearthhires")
library("rnaturalearth")
devtools can take a looong time to compile and install for some users. installation directly from github can now be done with the remotes package.
remotes::install_github("ropensci/rnaturalearthhires")
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 corruptI 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.