Macro peroxide::rbind

source ·
macro_rules! rbind {
    ( $x:expr, $y:expr ) => { ... };
    ( $x0:expr, $( $x: expr ),* ) => { ... };
}
Expand description

R like rbind

§Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    let b = matrix(c!(5,6),1, 2, Row);
    let c = matrix(c!(7,8),1, 2, Row);
    assert_eq!(rbind!(a.clone(),b.clone()), matrix!(1;6;1, 3, 2, Row));
    assert_eq!(rbind!(a,b,c), matrix!(1;8;1, 4, 2, Row));
}