siddharthab / rgo-example

Example of linking go code in R packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an example project to demonstrate how to use go code as part of an R package's dynamically loaded libraries, using the bazel rules for R.

Using R

To install the package and run all examples, run

R CMD INSTALL R/rgo
./examples.R

Using bazel

To build the package, run

bazel build R/rgo

You can then run an R function with

R_LIBS_USER=$(pwd -P)/bazel-bin/R/rgo/lib Rscript -e 'rgo::hello()'

To install the package and run all examples, run

bazel run R/rgo:library
./examples.R

About

Example of linking go code in R packages


Languages

Language:Go 66.7%Language:Python 14.1%Language:R 13.2%Language:C 5.9%