pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

Added install_github_r_package for installing r packages from remotes #191

Closed muschellij2 closed 4 years ago

muschellij2 commented 4 years ago

Description

Created simple wrapper install_github_r_package for installing r packages from remotes. Performs a check, similar to plumber:::droplet_capture to see if the package is installed already; if not, it installs remotes. Then uses remotes::install_github to install the

Related Issue

Example

install_github_r_package("sckott/analogsea")

Did not find tests for install_r_package so wasn't sure where to put install_github_r_package tests.

sckott commented 4 years ago

thanks very much @muschellij2

A few things:

  1. There's a bunch of white space changes - try to keep those to a minimum
  2. There's two functions added. droplet_ls was introduced in the PR but not mentioned. Open a separate PR for that. I'm not sure I'd accept it though since ls is pretty simple to just do as droplet_ssh(droplet, "ls")
  3. You don't need to namespace fxn calls within the pkg that those fxns are from, e.g, foo::bar() can just be bar()

it's really hard to test this pkg, but does the install_github_r_package fxn work for you? i can test it too.

muschellij2 commented 4 years ago

Sorry:

  1. WS came from RStudio loading and formatting.
  2. Removed droplet_ls. Agree it's simple, but I've found myself having to do it 5-6 times, and it seemed nice to have convenience function.
  3. install_github_r_package has worked for me.
sckott commented 4 years ago

thanks, i'll test it out and get back here

sckott commented 4 years ago

thanks