Select to view content in your preferred language

R-ArcGIS bridge setup issues

4654
16
10-06-2019 05:26 PM
HarleySchinagl
Occasional Contributor

I wanted to learn about R and ArcGIS so I started the R-ArcGIS Bridge web course. I haven't gotten off to a good start. I have only just started the course and installed the bridge. Then I received an error with arc.check_product(). The error is

> arc.check_product()
Error in arc.check_product() :
could not find function "arc.check_product"

The installation process seemed to work so I'm not sure what the issue is. I'm using ArcGIS Pro 2.4.2 and R Studio 1.2.1335

Tags (2)
0 Kudos
16 Replies
HarleySchinagl
Occasional Contributor

Ok, I installed it and got it to return the ArcGIS Pro product info in RGui, but not RStudio.

0 Kudos
by Anonymous User
Not applicable

You may want to go to Tools--> Global Options in R Studio and make sure that RStudio is calling the version of R that you have set up the bridge for. Then the next thing to check will be in Documents/R folder to make sure that there is an arcgisbinding folder for the version of R you are using. Let us know if this issue persists after checking these.

0 Kudos
HarleySchinagl
Occasional Contributor

Thanks for the info. I checked both of those and everything seems to be ok. Though, one minor thing to note is that the arcgisbinding folder was in Documents\R\win-library\3.6\arcgisbinding ... The other sources say the R version is 3.6.1. I am not sure if this matters. I have only ever had one version of R installed.

0 Kudos
by Anonymous User
Not applicable

Thank you for checking Harley. I think I have an idea about the issue you are having. I installed your ArcGIS Pro, R and R-ArcGIS Bridge versions and able to get the bridge running (image below).

My Current R Studio Output

We did find some issues with using bridge with R-Studio and 3.6.1 however. It seems 3.6.1 points totwo directories. One in the install location (inside Program Files) and another in Documents (that is where you found arcgisbinding to be installed).  However, when R is updated sometime R-Studio does not add the second location where new packages are installed (one in Documents). Can you please run the following after you launch R-Studio with R 3.6.1?

.libPaths()

In my workspace, it returns the following

R-Bridge resides in the first directory. I suspect that R-Studio does not have the Documents/R in its libPaths. If you do not see the first path you can add that path by simply providing as an input to .libPaths.

If you do see it however, then bridge might not have properly setup it that case I suggest the following:

1-) Erase arcgisbinding folder from Documents/R for 3.6.1

2-) Download zip file for bridge version 232 (as Shaun suggested above) from Release v1.0.1.232 · R-ArcGIS/r-bridge · GitHub 

3-) Launch Pro --> Geoprocessing --> Options --> R-ArcGIS Support

4-) Select R 3.6.1 from the drop-down. If you Pro does not find it (not likely), manually point to bin folder of 3.6.1 

5-) From the drop-down (black arrow) below the Detected R home directories click on "Install from Zip file" and point to the zip file you downloaded in step 2 and run.

This should set everything up correctly. If not please let us know.

0 Kudos
HarleySchinagl
Occasional Contributor

Thanks for the response. My directories match yours.

 

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Harley,

We recently released the v237 build of the bridge which contains fixes specifically for interacting with R 3.6 and current versions of RStudio -- could you try it out?

Thanks,

Shaun

0 Kudos
by Anonymous User
Not applicable

Hello Harley,

I am not sure if you are having issues with setting up the R-ArcGIS Bridge. It has been a while since your original post so I wanted to check back and share some updates on enhancements we made to the setup.

Now you can easily set up the bridge from R using the script below:

install.packages("arcgisbinding", repos="http://r.esri.com" type="win.binary")

 

Orhun

0 Kudos