I am using the plumberDeploy package in R to set up an API endpoints on DO to a droplet I have running now. I have a package that is on a public github that I need to install.
I’m trying to figure out how to use this function:
analogsea::install_github_r_package(mydrop, "PACERStuff", repo = "https://github.com/myname/Blog/tree/master/packagename")
Which does not work. If I were doing this in the R console it would be
devtools::install_github("myname/Blog", subdir='packagename')
Which does indeed install the package locally. Does anyone else have experience or knowledge on how to install an R package to a droplet from github, specifically using these same functions from plumberDeploy?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Indeed, the documentation is not very clear, maybe it’s worth raising an issue to report this!
But as far as I can see in their tests, they don’t specify the full GitHub URL:
Example test:
z <- install_github_r_package(x, "pachamaltese/eflm")
expect_false(z$locked)
expect_equal(z$status, "active")
So this indicates that the problem you are facing might be related to the specification of the GitHub repository in your call to analogsea::install_github_r_package(). The repo argument should be in the form “username/repo”, not a full URL (at least judging by their tests). Also, the subdir argument should be used to specify the subdirectory if the package is not in the root of the repository.
Here is how you might use the function:
analogsea::install_github_r_package(mydrop, "myname/Blog", subdir = "packagename")
This function should install the package located in the “packagename” subdirectory of the “myname/Blog” repository on your droplet named mydrop.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.