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