Learn R Programming

matsbyname (version 0.6.11)

rowtype: Row type

Description

Extracts row type of a.

Usage

rowtype(a)

Value

The row type of a.

Arguments

a

The object from which you want to extract row types.

Examples

Run this code
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)
# This also works for lists
rowtype(list(U,U))

Run the code above in your browser using DataLab