You may want to try
devtools::install_github("vbonhomme/Momocs") instead. As stated before, you need devtools to make it work.
Also, Momocs 1.0.0 is on CRAN so you can simply: install.packages("Momocs").
Have a look to the vignette for a nice entry point into the package. And I'm here to help if required.
Answer from Vincent Bonhomme on Stack OverflowHow do I install an R package from GitHub in RStudio?
How do I update a package installed from GitHub?
Do I need to install devtools every time?
You may want to try
devtools::install_github("vbonhomme/Momocs") instead. As stated before, you need devtools to make it work.
Also, Momocs 1.0.0 is on CRAN so you can simply: install.packages("Momocs").
Have a look to the vignette for a nice entry point into the package. And I'm here to help if required.
Please make sure you have the newest version of the devtools package. This is 1.5 at the moment.To do so run
install.packages("devtools")
Then you have 3 options:
1:) You can try using different parameter alternatives in the devtools package.
install_github("Momocs",username="jfpalomeque")
2:) Another way is trying to download the zip file and install it with the normal install.packages() function in R with:
install.packages(file_name_and_path, repos = NULL, type="source")
3:) You can also just install it from cran with
install.packages("Momocs")
as it is the same version and the same author as the github package.
Regards
Have you tried setting a personal access token (PAT) and passing it along as the value of the auth_token argument of install_github()?
See ?install_github way down at the bottom (Package devtools version 1.5.0.99).
Create an access token in: https://github.com/settings/tokens
Save it (Add it) to .Renviron file on the getwd() folder, this way:
GITHUBTOKEN=tokenstring
Add .Renviron to .gitignore file if your folder is a repository
Or add your tokenstring system-wide to this file if pertinent:
file.path(R.home(),"etc", "Renviron.site")
Restart R session, to get .Renviron and/or Renviron.site files loaded automatically
Check the branch name and pass it to ref
devtools::install_github("user/repo",
ref = "main",
auth_token = Sys.getenv("GITHUBTOKEN")
)
If you have the file locally, then use install.packages() and set the repos=NULL:
install.packages(path_to_file, repos = NULL, type="source")
Where path_to_file would represent the full path and file name:
- On Windows it will look something like this:
"C:\\RJSONIO_0.2-3.tar.gz". - On UNIX it will look like this:
"/home/blah/RJSONIO_0.2-3.tar.gz".
Download the source package, open Terminal.app, navigate to the directory where you currently have the file, and then execute:
R CMD INSTALL RJSONIO_0.2-3.tar.gz
Do note that this will only succeed when either: a) the package does not need compilation or b) the needed system tools for compilation are present. See: R for Mac OS X