Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install/importing an R library from cloned repo

Tags:

r

I have an R library cloned from a GitHub repo that I would like to modify. However, I've never built and imported a library in R from anything other than CRAN. How do I go about this?

like image 946
user1569339 Avatar asked Feb 10 '23 10:02

user1569339


1 Answers

If you intend to modify the code before building, then install_github() will not work. You should clone the git repo to a directory on your machine, and then run:

install.packages("devtools")
library(devtools)
build("~/put/the/package/path/here")

If you are using RStudio, you can use the cloned and modified source to create your own package as described here.

like image 177
Michael Kirchner Avatar answered Feb 12 '23 05:02

Michael Kirchner