Skip to content

Commit

Permalink
Merge pull request #12 from extendr/update_extendr_version
Browse files Browse the repository at this point in the history
Update_extendr_version
  • Loading branch information
JosiahParry authored Mar 16, 2024
2 parents d72d07d + 750fc81 commit 7a3861c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# extendr.github.io

This repository contains a dummy R project which allows us to
build a website for Extendr using pkgdown.
build a website for Extendr using `pkgdown`.

To build the site locally:

```
remotes::install_github("r-lib/pkgdown")
devtools::install()
pkgdown::build_site()
```r
remotes::install_github("r-lib/pkgdown")
devtools::install()
pkgdown::build_site()
```

There is a github action that builds the site and deploys to
the `gh-pages` branch when pushing to `main`.

On linux, you will also need:

```
```shell
sudo apt install fontconfig libfreetype2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev pandoc
```
12 changes: 6 additions & 6 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# extendr - A safe and user friendly R extension interface using Rust.
# extendr - A safe and user friendly R extension interface using Rust

[![Github Actions Build Status](https://github.com/extendr/extendr/workflows/Tests/badge.svg)](https://github.com/extendr/extendr/actions)
[![Crates.io](https://img.shields.io/crates/v/extendr-api.svg)](https://crates.io/crates/extendr-api)
Expand Down Expand Up @@ -95,15 +95,15 @@ R type|Extendr wrapper|Deref type: `&*object`
`integer`|`extendr_api::wrapper::Rint`|N/A
`double`|`extendr_api::wrapper::Rfloat`|N/A
`complex`|`extendr_api::wrapper::Rcplx`|N/A
`extptr`|`extendr_api::wrapper::ExternalPtr<T>`|`&T`
`extptr`|`extendr_api::wrapper::ExternalPtr<T>`|`&T` / `&mut T`

### Vector types

R type|Extendr wrapper|Deref type: `&*object`
------|---------------|----------------------
`integer`|`extendr_api::wrapper::Integer`|`&[Rint]`
`integer`|`extendr_api::wrapper::Integers`|`&[Rint]`
`double`|`extendr_api::wrapper::Doubles`|`&[Rfloat]`
`logical`|`extendr_api::wrapper::Logical`|`&[Rbool]`
`logical`|`extendr_api::wrapper::Logicals`|`&[Rbool]`
`complex`|`extendr_api::wrapper::Complexes`|`&[Rcplx]`
`string`|`extendr_api::wrapper::Strings`|`&[Rstr]`
`list`|`extendr_api::wrapper::List`|`&[Robj]`
Expand All @@ -119,7 +119,7 @@ R type|Extendr wrapper|Deref type: `&*object`

## Examples

### Returning lists and strings.
### Returning lists and strings

Lists and strings in rust are vectors of R objects.
These are represented by the wrappers `List` and `Strings`.
Expand Down Expand Up @@ -188,7 +188,7 @@ fn get_na_float() -> Rfloat {
We can use Extendr to take advantage of the stats and plotting functions
in R.

For example, we could make a web server that returns plots of incomming data.
For example, we could make a web server that returns plots of incoming data.

```rust
use extendr_api::{test, Result, eval_string, eval_string_with_params};
Expand Down
6 changes: 3 additions & 3 deletions started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Extendr is available on [crates.io](https://crates.io/crates/extendr-api).

Simply add this line to the `[dependencies]` section of a rust crate.
Simply add this line to the `[dependencies]` section of a rust crate's `Cargo.toml`.
You will then be able to call R code from Rust.

```toml
[dependencies]
extendr-api = "0.4"
extendr-api = "0.6"
```

## Installation - R

There are two ways you can use the extendr API from R. First, you can use the [rextendr](https://extendr.github.io/rextendr/) package to call individual Rust functions from an R session. Second, you can write an R package that uses compiled Rust code, see the [helloextendr](https://github.com/extendr/helloextendr) repo for a minimal example.
There are two ways you can use the `extendr` API from R. First, you can use the [`rextendr`](https://extendr.github.io/rextendr/) package to call individual Rust functions from an R session. Second, you can write an R package that uses compiled Rust code, see the [`helloextendr`](https://github.com/extendr/helloextendr) repo for a minimal example.

0 comments on commit 7a3861c

Please sign in to comment.