Learn R Programming

multiplex (version 2.5)

relabel: Relabel a Semigroup Object

Description

Function to relabel the elements of a `Semigroup' class object.

Usage

relabel(S, labels = NULL)

Arguments

S
an object from the `Semigroup' class
labels
the new labels of the semigroup

Value

A `Semigroup' object with the semigroup with the new labels

Details

Basically this is a function to change the labels of the strings in the multiplication table represented by an object of the `Semigroup' class. Usually this is a consequence of the equations existing in the relational structure.

See Also

semigroup, as.semigroup, convert, strings

Examples

Run this code
## Create the multiplication table
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)

## make a semigroup object with labels
S <- as.semigroup(s, labels=c('n', 'm', '<f1>'))

## convert to a symbolic form a semigroup with relabeled strings
convert(relabel(S, labels=c('a', 'b', 'c')))

Run the code above in your browser using DataLab