v <- matrix(c(1,
2,
3,
4),
nrow = 4, ncol = 1, dimnames = list(c("p1 -> i1",
"p2 -> i1",
"p1 -> i2",
"p2 -> i2"))) %>%
setrowtype("Products -> Industries")
# Default separator is " -> ".
matricize_byname(v, notation = RCLabels::arrow_notation)
Run the code above in your browser using DataLab