knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
You can install development version from GitHub with:
# install.packages("devtools") devtools::install_github("jmbarbone/rustandr")
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.