as.strings: Coerce Object into a Strings Class

as.stringsR Documentation

Coerce Object into a Strings Class

Description

A generic function for coercing an R object into a “Strings” class.

Usage

as.strings(x, lbs)

Arguments

x

An array, usually with three dimensions of stacked matrices where the multiple relations are placed.

lbs

(optional) Labels of strings.

Details

Use this function to prepare an object for establishing the partial order of relation strings by converting it to class “Strings”. It returns as well the number of unique relations in the semigroup represented by the dimensions in x.

Value

The input array in x as an object of “Strings” class

wt

word tables

ord

dimension in x

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 July 30, 2026, 5:13 p.m.