Exploratory Community

Installing a package from Github with remotes

#1

I am interested in trying out the postmastr package (https://slu-opengis.github.io/postmastr/); looks like it can be installed from Github with remotes? Is there a way to do this in Exploratory?

#2

I noticed the option to install a package from a zip file, so I went through the process in RStudio, thinking I could use that to download a zip file and then point Exploratory.io to it. It appears that postmastr is made up of 65 packages?

Would it be necessary or even possible to install these one at a time?

#3

Hi, Stephanie.

Installing packages directly from github is not supported on Exploratory yet. But if you are familiar with R/RStudio, you can install packages to Exploratory using R/RStudio.

The point is calling .libPaths command to point the Exploratory R library path before the installation. You can just run a single command like following.

.libPaths("~/.exploratory/R/3.6")

The default Exploratory R library path is ~/.exploratory/R/3.6. If you have changed the default Exploratory repository location, replace “~/.exploratory” part with your Exploratory repository location.

After that, you can run install_github command to install packages. Once you finish the installation, restart the Exploratory then you are ready to use the package on Exploratory.

–Kei

1 Like
#4

Hi Kei! Thanks for the path forward. I made some progress, but am still not having success using postmastr in Exploratory.

This is what ended up doing in RStudio:

> .libPaths("C:/.exploratory/R/3.6")
> .libPaths()
[1] "C:/.exploratory/R/3.6"                               "C:/Users/sbrad/OneDrive/Documents/R/R-3.6.0/library"
> remotes::install_github("slu-openGIS/postmastr", force = TRUE)

Also, importantly, I learned that I needed to run RStudio as an administrator.

I can see the postmastr folder in the packages folder:
image

But when I go into Exploratory (even after restarting my machine) it doesn’t show up under either the User or System R Packages.

What can I try next?

Thanks,
Stephanie

#5

To be clear, I had previously relocated the Repository:
image

#6

Well, I am really stumped on getting postmastr into Exploratory.

In the last day I have tried:

  1. doing fresh installs of both Exploratory and RStudio, installing postmastr to the Exploratory repository (C:.exploratory\R\3.6) using remotes as you suggested,

  2. installing the 65 packages to a new RStudio folder and then moving those folders over to Exploratory.

  3. installing the packages in Exploratory using the option to install the zipped files that RStudio downloaded to a temp folder. That seemed to create all kinds of issues in Exploratory and I still am not able to use the postmastr functions.

And the oddest thing to me is that through all this, I only see the postmastr folder/ package when doing the install in RStudio; it doesn’t show up in the Exploratory folders.

#7

Hi Stephanie.

I tried the postmastr package. I noticed that the installation requires upgrading of several core packages that Exploratory depends on such as dplyr. So if you install it, Exploratory may or may not work properly. I think that’s the “all kinds of issues” that you saw. I’m sorry but I don’t think postmastr and exploratory can coexist at this moment.

Thanks.
–Kei

1 Like
#8

No biggie, I began using postmastr in Rstudio and it’s not as simple as I would like but it is working for me. Thank you for following up on this!