R-ArcGIS / r-bridge

Bridge library to connect ArcGIS and R, including arcgisbinding R library.
Apache License 2.0
119 stars 26 forks source link
arcgis r r-package

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

Return Value

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