Macro peroxide::cbind

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

R like cbind

§Examples

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

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