# create labeled multiplication table data
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)
# set attributes to 's'
attr(s, "dimnames") <- list(1:3, 1:3)
# make a semigroup object
as.semigroup(s)
Run the code above in your browser using DataLab