Closed bnicenboim closed 2 years ago
All set - thanks for catching this.
pacman::p_load(tidytable)
m <- matrix(data = 1:3)
rownames(m) <- c("a","b","c")
m %>% as_tidytable(.keep_rownames = "id")
#> # A tidytable: 3 × 2
#> id V1
#> <chr> <int>
#> 1 a 1
#> 2 b 2
#> 3 c 3
It would be good to not have to go through data frame to keep the rownames of a matrix, see below:
Created on 2022-07-10 by the reprex package (v2.0.1)