Skip to main content

extract_unit_from_rvalue

Function extract_unit_from_rvalue 

Source
fn extract_unit_from_rvalue(val: &RValue) -> Unit
Expand description

Extract a Rust Unit from an R value representing a unit object.

Handles both:

  • A unit object (list with class “unit”, fields “value” and “units”)
  • A bare numeric vector (treated as NPC by default)