as.strings: Coerce an Object to a Strings Class

as.stringsR Documentation

Coerce an Object to a Strings Class

Description

A generic function for coercing an R object to a Rel.Strings class.

Usage

as.strings(x, lbs = NULL)

Arguments

x

an array; usually with three dimensions of stacked matrices where the multiple relations are placed.

lbs

(optional) the labels of the strings

Details

This function is useful to proceed with the establishment of the partial order in the strings of relations where the object should be of a 'Strings' class.

Value

An object of 'Strings' class

wt

the word tables

ord

the number of unique relations in the semigroup

Author(s)

Antonio Rivero Ostoic

See Also

strings, partial.order, zbind

Examples

## Create the data: two sets with a pair of binary relations among 
## three elements
arr1 <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
        c(3,3,2))>.5, 3 ) )

arr2 <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
        c(3,3,2))>.5, 3 ) )

## bind the data sets
arrs <- zbind(arr1, arr2)

## make the data a strings object
as.strings(arrs)


multiplex documentation built on Nov. 16, 2023, 5:08 p.m.