GithubHelp home page GithubHelp logo

Comments (7)

scw avatar scw commented on June 6, 2024 1

Ah, I see. Yes, the fix will allow you to install and use the bridge from R, but still not from ArcGIS (to run R-based Geoprocessing scripts). This code isn't something I can easily update, but there are a few possible work-arounds, here are two that should work without a great deal of effort:

  1. The easiest thing to do is to just copy the arcgisbinding package into the R installation library directory, so locate the D:/myUserName/Home/R/win-library/3.2/arcgisbinding directory, and copy that into C:/Program Files/R/R-3.2.0/library. This will require administrator privileges.
  2. Another option is to unset the %HOME% variable, and the bridge will be installed into a standard location instead of in a location ArcGIS isn't currently configured to check. If you do so, you may need to copy other packages you have installed from ``D:/myUserName/Home/R/win-library/3.2` into one of the other locations R is checking for packages, or reinstall these packages and R will place them into the correct location.

If neither of these work or are easy to do, I can mention some other approaches we can use.

Cheers, Shaun

from r-bridge-install.

scw avatar scw commented on June 6, 2024

Hello @fpfr,

Thanks for the issue report. It looks like the current script doesn't automatically detect the Users' directory when it's installed on a different drive (it defaults to checking the windows value of CSIDL_PROFILE). Could you run this script:

https://gist.github.com/scw/59783c7720a73148362f71149d1ebd77

And print out the results? My guess is, R does more checks than we currently do, and I can emulate the full behavior to find the Users directory on another drive.

Thanks,
Shaun

from r-bridge-install.

fpfr avatar fpfr commented on June 6, 2024

Hello Shaun,

what do you mean with

doesn't automatically detect the Users' directory when it's installed on a different drive

All is installed on C:, however, in different sub-directories. Now, thinking about it: I have a system variable %HOME% which points to "D:/MyUserName/Home" where "MyUserName" is not the user name of the user logged in. The script "InstallBindings" somehow seems to honor %HOME% and things get messed up ...

Anyway, I ran your new script with "Admininstrator" privileges and got the following

CSIDL_PROFILE + Documents: C:\Users\User\Documents
CSIDL_PERSONAL: C:\Users\User\Documents
HOMEDRIVE + HOMEPATH + Documents: C:\Users\User\Documents

running the Script as User, I got the same

CSIDL_PROFILE + Documents: C:\Users\User\Documents
CSIDL_PERSONAL: C:\Users\User\Documents
HOMEDRIVE + HOMEPATH + Documents: C:\Users\User\Documents

Hope this helps ...

from r-bridge-install.

scw avatar scw commented on June 6, 2024

Hello @fpfr,

Great, thanks for the details. When the InstallBindings script runs, it uses R to actually do the installation. As you figured out, R picks up the %HOME variable and installs the package into that location. I've applied a fix in ffdc013 to detect the value of HOME and check for the package there, could you see if this change works for you by redownloading the ZIP or pulling the current repository?

Cheers,
Shaun

from r-bridge-install.

fpfr avatar fpfr commented on June 6, 2024

Hello Shaun,
thanks for the effort, but unfortunately, no success. I stil get

*** Please install ArcGIS R integration package
Failed to execute (myScript).

Here is the output of InstallBindings

Found local copy of binding, installing from zip
Rcmd.exe INSTALL d:\temp\tmpzcg4qo\arcgisbinding_1.0.0.119.zip
package 'arcgisbinding' successfully unpacked and MD5 sums checked
* installing to library 'D:/myUserName/Home/R/win-library/3.2'
Completed script InstallBindings...

And RInstallDetails

R (version 3.2.0), installed in: C:\Program Files\R\R-3.2.0
R packages will be installed into: D:\myUserName\Home\R\win-library\3.2
All R package libraries detected: D:\myUserName\Home\R\win-library\3.2;C:\Program Files\R\R-3.2.0\library
The ArcGIS R package (version 1.0.0.119) is installed at: D:\myUserName\Home\R\win-library\3.2\arcgisbinding

And finally the output of "documents_home.py"

CSIDL_PROFILE + Documents: C:\Users\User\Documents
CSIDL_PERSONAL: C:\Users\User\Documents
HOMEDRIVE + HOMEPATH + Documents: C:\Users\User\Documents

Best regards

from r-bridge-install.

fpfr avatar fpfr commented on June 6, 2024

OK, work-around 1) did the trick.
Thank you very much for your help!
BTW: Will someone sometime fix the issue of the installation?

from r-bridge-install.

scw avatar scw commented on June 6, 2024

Great, glad that worked! Will mark this closed, but feel free to reopen if issues pop up.

This package handles the installation so that R can see it — the piece which detects the R package is within ArcGIS, so we can fix it for future releases but not easily for existing releases.

from r-bridge-install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.