Building Rust based R Packages
Rust for R Developers
Get set up
Intro to Rust for R Developers
1
Why Rust?
2
Hello, World!
3
Basic Types
4
Control Flow
5
Arrays and Vectors
6
for
-loops
7
Mutability
8
Mutable Vectors
9
Functions
10
Ownership
11
Iterators
12
Mapping over Iterators
13
Defining Struct(ure)s
14
Struct Methods
15
Enum(eration)s
16
Some()
or
None
?
Building Rust based R Packages
17
Foreign Function Interfaces (FFI)
18
What is extendr?
19
Workshop Scope
20
Hello, world!
21
Package structure
22
Developer Experience
23
Adding dependencies
24
Your first function
25
Encoding a geohash
26
Throwing errors
27
Vectorizing
28
R’s Type System
29
Collecting extendr types
30
Handling Errors
31
Handle NAs gracefully
32
Translating Enums
33
Geohash Neighbor
34
Vectorize
gh_neighbor()
35
Decode a geohash
36
Vectorize
decode()
37
Vibe check
Building Rust based R Packages
16
Some()
or
None
?
17
Foreign Function Interfaces (FFI)