Skip to contents

Like mat, but returns a data frame.

Usage

dmat(x, ...)

Arguments

x

A data vector, character string, or a list.

...

Aditional optional arguments passed on to mat.

Value

A data.frame.

See also

Examples

dmat("1e-01, 2+5, 3, 4, 5; 6, 7, 8, 9^2, pi", rows = FALSE)
#>      V1  V2
#> 1 1e-01   6
#> 2   2+5   7
#> 3     3   8
#> 4     4 9^2
#> 5     5  pi
z <- list(a = 1:10, b = 11:20, c = 21:30)
dmat(z) # list elements form rows
#>   V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
#> a  1  2  3  4  5  6  7  8  9  10
#> b 11 12 13 14 15 16 17 18 19  20
#> c 21 22 23 24 25 26 27 28 29  30
dmat(z, rows = FALSE) # list elements form columns
#>     a  b  c
#> 1   1 11 21
#> 2   2 12 22
#> 3   3 13 23
#> 4   4 14 24
#> 5   5 15 25
#> 6   6 16 26
#> 7   7 17 27
#> 8   8 18 28
#> 9   9 19 29
#> 10 10 20 30