Extracts row type of a
.
rowtype(a)
a | the object from which you want to extract row types |
---|
the row type of a
library(dplyr) commoditynames <- c("c1", "c2") industrynames <- c("i1", "i2") U <- matrix(1:4, ncol = 2, dimnames = list(commoditynames, industrynames)) %>% setrowtype(rowtype = "Commodities") %>% setcoltype("Industries") rowtype(U)#> [1] "Commodities"#> [[1]] #> [1] "Commodities" #> #> [[2]] #> [1] "Commodities" #>