/r-bridge

Bridge library to connect ArcGIS and R, including arcgisbinding R library.

Primary LanguageC++Apache License 2.0Apache-2.0

R-integration for ArcGIS Pro and Desktop

Requirements

Latest R Core for Windows (http://cran.r-project.org/bin/windows/base/)

Official web page https://r-arcgis.github.io/

Installation

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

Basic GP Tool R script

tool_exec <- function (in_params, out_params)
{
  value0 <- in_params[[1]]
  print(value0)
# ...
  out_params$output1 <- TRUE
  return (out_params)
}

tool_exec(in_params, out_params) - required main function

Parameters

  • in_params list of all input parameters
  • output_params list of all output and derived parameters

You can get tool parameter value by index in_params[[1]] or by parameter name output_params$output1

Return Value

  • set or update output GP parameters and return output_params.

Using arcgisbinding in standalone R script

> library(arcgisbinding)
> arc.check_product()
> d <- arc.open("c:/mydb.gdb/points")

Build

> git clone https://devtopia.esri.com/r-integration .

Rebuild Visual Studio solution r-integration/src/msprojects/R-bridge.sln

or

> cd r-integration/build/
> build.bat pro debug

or

Production build with Docker image

Build dependencies