![]() ![]() Install.packages("K:/path/to/folder/packageName_x.x.x.tar. # errors if package dependencies are missing: Other combinations of remotes::install_local() versus install.packages() and source versus binaryÄ«ased on my experimentation this is what happens: # gives a warning and package doesnt get installedÄevtools::install_local("K:/path/to/folder/packageName_x.x.x.zip", upgrade = "never", type="binary") There is a possibility we are doing something wrong. Unfortnunately we can't get it to work with our setup. To install a package from CRAN, use the command install.packages('packagename')- of course substituting the. Install a local R package with dependencies from CRAN mirror - Stack Overflow Useful R packages in a handy searchable table. We have gone through the answers to this stackoverflow post, in particular the one # linked when you click on the link below: Additionally we would prefer a solution that doesn't involve any other dependencies (i.e. This works quite well, but installing via the source/.tar.gz (as opposed to the binary/.zip version) means that RTools can be required to install some packages. This what I have started using for one our packages (a bit of a behemoth with lots of CRAN dependencies), instead of the above approach and it works quite well for that package. remotes::install_local() + tar.gz (source version) remotes::install_local("K:/path/to/folder/packageName_x.x.x.tar.gz", upgrade = "never", type="source") In addition to our existing solution we have investigated the approaches outlined below. While what we currently have works okay, it could be more streamlined.Īlso note that we exclusively use the Windows operating system and a lot of the information about this topic I have found (in particular: Install a local R package with dependencies from CRAN mirror - Stack Overflow) appears to be more geared towards Mac/Linux. Once you have a package installed, you can make its contents available to use in your current R session by running. Under Packages, type, and search Package which we want to install and then click on install button. ![]() We have investigated a few potential solutions I will outline below. To install an R package, open an R session and type at the command line. Our technology team have not been helpful when we've asked them to set up some sort of cloud repository (although solutions to this effect would also be interesting). Preferably assume we have to continue sharing them on a network drive. Question: What is the best practice for sharing and the installation process for organisational R packages? Ideally the CRAN dependencies would be installed. The issue with the above approach is that while it will install the package itself, it will not install any of its dependencies (either on CRAN or the network drive). I am positing this anyway for additional insights but this method looks promising. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |