Skip to main content

RobjItertools

Trait RobjItertools 

Source
pub trait RobjItertools: Iterator {
    // Provided methods
    fn collect_robj(self) -> Robj
       where Self: Iterator + Sized,
             Self::Item: ToVectorValue { ... }
    fn collect_rarray<const LEN: usize>(
        self,
        dims: [usize; LEN],
    ) -> Result<RArray<Self::Item, LEN>>
       where Self: Iterator + Sized,
             Self::Item: ToVectorValue,
             Robj: for<'a> AsTypedSlice<'a, Self::Item> { ... }
}
Expand description

Extensions to iterators for R objects including RobjItertools::collect_rarray().

Provided Methods§

Source

fn collect_robj(self) -> Robj
where Self: Iterator + Sized, Self::Item: ToVectorValue,

👎Deprecated since 0.10.0:

Use collect::<Robj>() instead

Convert a wide range of iterators to Robj.

Source

fn collect_rarray<const LEN: usize>( self, dims: [usize; LEN], ) -> Result<RArray<Self::Item, LEN>>
where Self: Iterator + Sized, Self::Item: ToVectorValue, Robj: for<'a> AsTypedSlice<'a, Self::Item>,

Collects an iterable into an RArray. The iterable must yield items column by column (aka Fortan order)

§Arguments
  • dims - an array containing the length of each dimension

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> RobjItertools for T
where T: Iterator,