R/list2matrix.r

  list2matrix = function( x, split=",") {
    y = strsplit(as.character( x ), split=split )
    nr = length( y )
    z = unlist( y )
    nc = length (z) / nr
    o = matrix( z, nrow=nr, ncol=nc, byrow=T)
    return( o )
  }
AtlanticR/bio.spacetime documentation built on May 28, 2019, 11:34 a.m.