Set up R packages in a new environment is annoying.
Even though we have packrat
to help us manage package dependency, sometimes the process is still too complicated, especially for new R users. The problem is that packrat
manages the project level package dependency (somewhat similar with npm) while in many real world cases, all we need is just to "copy" all the R packages I have on computer A and "paste" them to computer B. Could we just have a simple solution for this simple task?
This package will allow you to copy the names of your favorite packages to a public cloud space using pkg_copy()
. Your package info will stay there for 24 hrs and you will get a download code. On a new computer, you can use that code inside pkg_paste()
to download all the packages that are not on the new computer. It is just that simple!
library(pkgcopier)
pkg_copy()
Output: Success! You just copied your R package info to cloud! Your download code is: mh223J3LHD0a This code will expire in 24 hours. Re-run this function if time runs out.
# install.packages("devtools")
# devtools::install_github("haozhu233/pkgcopier")
library(pkgcopier)
pkg_paste("mh223J3LHD0a")
That's it!
Welcome contributions from all levels. Also, feel free to use the source code in other packages.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.