Description Usage Arguments Details Value Examples
View source: R/extendr-wrappers.R
Demonstrates passing a character (string) value back and forth between R and Rust, uppercasing the string in Rust to prove it works.
1 |
s |
A character value to treat as a string in Rust |
The value passed to this function must be a character (string) or an
NA_character_. The Rust function signature is
pass_single_character_fn(s: Option<String>) -> Option<String>
, with NA's
being handled as None
in Rust.
toupper(s)
1 2 | pass_single_character("hello") # "HELLO"
pass_single_character(NA_character_) # NA_character_
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.