Convert data.frame and tibbles to matrices with named rows and columns
Source:R/main.R
df2matrix.Rd
Convert data.frame and tibbles to matrices with named rows and columns
Examples
d <- data.frame(rname = c("x1", "x2"), x1 = c(1,2), x2 = c(3,4))
df2matrix(d)
#> x1 x2
#> x1 1 3
#> x2 2 4