Gets column names in a way that is amenable to use in chaining operations in a functional programming way
getcolnames_byname(a)
a | The matrix or data frame from which column names are to be retrieved |
---|
column names of m
m <- matrix(c(1:6), nrow = 2, dimnames = list(paste0("i", 1:2), paste0("c", 1:3))) %>% setrowtype("Industries") %>% setcoltype("Commodities") getcolnames_byname(m)#> [1] "c1" "c2" "c3"#> [[1]] #> [1] "c1" "c2" "c3" #> #> [[2]] #> [1] "c1" "c2" "c3" #>#> [[1]] #> [1] "c1" "c2" "c3" #> #> [[2]] #> [1] "c1" "c2" "c3" #>