Install R packages from github downloading master.zip
This answer is just a refined version of my comments. Essentially you can install packages using devtools
by unzipping a local zipfile downloaded from github, and then running the install
function
install("path/to/unzipped_pkg_zip_file")
The latest dev version of devtools
contains an install_local
utility function that makes it easy to work directly with local zip files.
Installing a package offline from GitHub
Let's assume that you have Rtools and devtools on the win machine.
Step 1: Download the source zip.
Step 2: Copy to the win machine and unzip the content there.
Step 3: Run the following code (adjust the path as necessary):
library(devtools)
source <- devtools:::source_pkg("E:/temp/data.table-master")
install(source)
library(data.table)
#loads 1.9.7
Rstudio unable to install 'psimetrica-R' package from Github
A github source repository is not an R package repository like CRAN -- so you cannot use install.packages()
.
Instead, use remotes::install_gihub()
as in
if (!requireNamespace("remotes", quietly=TRUE)) install.packages("remotes")
remotes::install_github("stmueller/psimetrica-R")
This will install remotes
if needed, and use it to install the desired package.
Or, at least, that would work in principle if psimetrica-R
was a regular R source package. Here it fails because of its layout:
> remotes::install_github("stmueller/psimetrica-R")
Error: Failed to install 'unknown package' from GitHub:
cannot open URL 'https://api.github.com/repos/stmueller/psimetrica-R/contents/DESCRIPTION?ref=HEAD'
>
So you could fork the repo and make it proper package first. At least open source lets you do that.
Related Topics
Regression Tables in Markdown Format (For Flexible Use in R Markdown V2)
How to Find Useful R Tutorials with Various Implementations
Calling a Function from a Namespace
Colorize Clusters in Dendogram with Ggplot2
How to Properly Document S4 "[" and "[<-" Methods Using Roxygen
Remove Fill Around Legend Key in Ggplot
Adding Total/Subtotal to the Bottom of a Datatable in Shiny
Modify Variable Within R Function
Find Overlapping Dates for Each Id and Create a New Row for the Overlap
Long and Wide Data - When to Use What
Optimal/Efficient Plotting of Survival/Regression Analysis Results
Apply Grouped Model Back Onto Data
How to Refer to a Variable Name with Spaces
How to Change Font Size of the Correlation Coefficient in Corrplot
Shade Region Between Two Lines with Ggplot
In R, What Does "Loaded via a Namespace (And Not Attached)" Mean
Earliest Date for Each Id in R
Plot Circle with a Certain Radius Around Point on a Map in Ggplot2