Description Usage Arguments Details Value Examples
View source: R/extendr-wrappers.R
Demonstrates passing a logical (boolean) value back and forth between R and Rust, flipping the value in Rust to prove it works.
1 |
b |
A logical (boolean) value to treat as a bool in Rust |
The value passed to this function must be a logical, the boolean type in
R, or an NA (plain NA is logical). The Rust function signature is
fn pass_single_logical_fn(b: Option<bool>) -> Option<bool>
, with
NA's being handled as None
in Rust.
!b
1 2 | pass_single_logical(TRUE) # FALSE
pass_single_logical(NA) # NA
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.