knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rustandr

The goal of rustandr is to provide a template to run Rust code through and R package. It's practice and note keeping for myself.

Installation

You can install development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jmbarbone/rustandr")

Example

This is a basic example which shows you how to solve a common problem:

library(rustandr)
## basic example code
foo_hello()

foo_int()

foo_intn(1:100)

foo_intn(seq(-12L, 17L, 1L))

# multiplies x by y
foo_intxy(3L, 8L)

# divides x by y
foo_dblxy(61, 7)

foo_int_cumsum(rpois(10, 5))


jmbarbone/rustandr documentation built on May 31, 2020, 2:40 p.m.