m <- matrix(1:4, nrow = 2, ncol = 2, byrow = TRUE,
dimnames = list(c("r1 [to a]", "r2 [to b]"),
c("c1 [from c]", "c2 [from d]"))) %>%
setrowtype("rows") %>% setcoltype("cols")
m
select_rowcol_piece_byname(m, retain = "r1", piece = "noun",
notation = RCLabels::to_notation,
margin = 1)
select_rowcol_piece_byname(m, retain = "b", piece = "to",
notation = RCLabels::bracket_notation,
margin = 1)
select_rowcol_piece_byname(m, retain = "c1", piece = "noun",
notation = RCLabels::bracket_notation,
margin = 2)
select_rowcol_piece_byname(m, retain = "d", piece = "from",
notation = RCLabels::bracket_notation,
margin = 2)
select_rowcol_piece_byname(m, retain = "c", piece = "from",
notation = RCLabels::bracket_notation,
margin = 2)
select_rowcol_piece_byname(m, retain = "b", piece = "to",
notation = RCLabels::bracket_notation,
margin = "rows")
select_rowcol_piece_byname(m, retain = "c", piece = "from",
notation = RCLabels::bracket_notation,
margin = "cols")
Run the code above in your browser using DataLab